Crystalline ErCl3 nanowires have been fabricated in single-walled carbon nanotubes (SWCNTs) with high yield (∼90%), and the structural and magnetic properties of the resulting ErCl3 nanowires encapsulated in SWCNTs (ErCl3@SWCNTs) characterized. Encapsulation under high temperature and vacuum using high quality SWCNTs results in a high filling-ratio of ErCl3 nanowires in the SWCNTs. The high filling-ratio of ErCl3 nanowires and the use of highly pure SWCNTs with only a small amount of residual Fe catalyst nanoparticles enabled us to observe the magnetic properties of ErCl3@SWCNTs. Structure determination based on simulated annealing calculations and high-resolution transmission electron microscope (HRTEM) image simulations revealed that the structure of the ErCl3 nanowires is unusual with respect to the coordination environment of the Eu3+ ions. This work opens up new possibilities to fabricate various metal complex nanowires with high yield and may also be of more general importance in understanding and exploring magnetic properties in low-dimensional magnetic systems.