The structures of H2 nanowires were studied by a geometry optimization method. As the radii of boron nitride (BN) nanotubes increase, the structures of the H2 nanowires transform from mono-chain to helical and multishell coaxial cylinders. The density of states (DOSs) and optical properties using the density functional theory (DFT) of optimized nanowires were also obtained. From the DOSs, it can be seen the H2 nanowires are conductive in nano-scale. The DOS curve of the single atomic chain is quite different from that of the corresponding chain embedded in B-N nanotubes.