Bead-based optical encoding or magnetic encoding techniques are promising in high-throughput multiplexed detection and separation of numerous species under complicated conditions. Therefore, a self-assembly strategy implemented in an organic solvent is put forward to fabricate fluorescent-magnetic dual-encoded nanospheres. Briefly, hydrophobic trioctylphosphine oxide-capped CdSe/ZnS quantum dots (QDs) and oleic acid-capped nano-γ-Fe2O3 magnetic particles are directly, selectively and controllably assembled on branched poly(ethylene imine)-coated nanospheres without any pretreatment, which is crucial to keep the high quantum yield of QDs and good dispersibility of γ-Fe2O3. Owing to the tunability of coating amounts of QDs and γ-Fe2O3 as well as controllable fluorescent emissions of deposited-QDs, dual-encoded nanospheres with different photoluminescent emissions and gradient magnetic susceptibility are constructed. Using this improved layer-by-layer self-assembly approach, deposition of hydrophobic nanoparticles onto hydrophilic carriers in organic media can be easily realized; meanwhile, fluorescent-magnetic dual-functional nanospheres can be further equipped with readable optical and magnetic addresses. The resultant fluorescent-magnetic dual-encoded nanospheres possess both the unique optical properties of QDs and the superparamagnetic properties of γ-Fe2O3, exhibiting good monodispersibility, huge encoding capacity and nanoscale particle size. Compared with the encoded microbeads reported by others, the nanometre scale of the dual-encoded nanospheres gives them minimum steric hindrance and higher flexibility.