A method for forming, on a conductive or semiconductor substrate, nanowires based on CuSCN, including the steps of: preparing an aqueous electrolytic solution from a Cu(II) salt having a concentration lower than 120 mM, a Cu(II) complexing agent from the aminocarboxylic acid family, and a thiocyanate salt, the solution having a pH ranging between 0.1 and 3; electrochemically depositing the aqueous electrolytic solution on the substrate.