Hydrogen-treated ZnCoO shows magnetic behavior, which is related to the formation of Co-H-Co complexes. However, it is not well known how the complexes are connected to each other and with what directional behavior they are ordered. In this point of view, ZnCoO nanowire is an ideal system for the study of the magnetic anisotropy. ZnCoO nanowire was fabricated by trioctylamine solution method under different ambient gases. We found that the oxidation of trioctylamine plays an essential role on the synthesis of high-quality ZnCoO nanowires. The hydrogen injection to ZnCoO nanowires induced ferromagnetism with larger magnetization than ZnCoO powders, while becoming paramagnetic after vacuum heat treatment. Strong ferromagnetism of nanowires can be explained by the percolation of Co-H-Co complexes along the c-axis.