We present an embedded cluster model to treat one-dimensional nanostructures, using a hybrid quantum mechanical/molecular mechanical (QM/MM) approach. A segment of the nanowire (circa 50 atoms) is treated at a QM level of theory, using density functional theory (DFT) with a hybrid exchange-correlation functional. This segment is then embedded in a further length of wire, treated at an MM level of theory. The interaction between the QM and MM regions is provided by an embedding potential located at the interface. Point charges are placed beyond the ends of the wire segment in order to reproduce the Madelung potential of the infinite system. We test our model on the ideal system of a CdS linear chain, benchmarking our results against calculations performed on a periodic system using a plane-wave DFT approach, with electron exchange and correlation treated at the same level of approximation in both methods. We perform our tests on pure CdS and, importantly, the system containing a single In or Cu impurity. We find excellent agreement in the determined electronic structure using the two approaches, validating our embedded cluster model. As the hybrid QM/MM model avoids spurious interactions between charged defects, it will be of benefit to the analysis of the role of defects in nanowire materials, which is currently a major challenge using a plane-wave DFT approach. Other advantages of the hybrid QM/MM approach over plane-wave DFT include the ability to calculate ionization energies with an absolute reference and access to high levels of theory for the QM region which are not incorporated in most plane-wave codes. Our results concur with available experimental data.