We synthesized Ge and Ge1-xMx (M = Mn, Co, and Fe, x ≤ 0.2) nanowires using thermal vapour transport method. All nanowires consisted of single-crystalline Ge nanocrystals grown uniformly with the  direction. High-resolution X-ray diffraction pattern shows no cluster formation for all Ge1-xMx nanowires. The Mn and Fe doping decreases the lattice constant, but not Co doping. X-ray absorption spectroscopy and X-ray magnetic circular dichroism measurement revealed that the Mn2+ and Fe2+ ions preferentially occupy the tetrahedral sites, substituting for Ge. We suggest that the Mn or Fe ions produce dopant-acceptor hybridization with host defects in p-type Ge, but not Co ions. The magnetic moment of Mn2+ ions reaches a maximum for x = ∼ 0.1, which is much larger than that of the Fe2+ ions. The magnetization measurement also confirms the room-temperature ferromagnetism of Mn-doped Ge nanowires, which is maximized at x = ∼ 0.1. We conclude that the Mn ions are most efficiently doped into the Ge nanowires to form a ferromagnetic semiconductor.