The construction of lanthanide-based molecular magnets by a self-assembly strategy of multidentate building blocks and functional ligands is continuing to be a hot research topic. Among them, embedding 4d/5d-based building blocks into 4f molecular nanomagnets is promising as it can bring about more fascinating structures and stronger interactions between 4d/5d and 4f ions. In this work, we report the self-assembly reaction of trivalent lanthanide ions (DyIII, ErIII), multidentate ligand 1,3-di(2-pyridinyl)-1,3-propanedione (HL), and octacyanometallate building blocks [MV(CN)8]3– (M = W, Mo). Three different types of cyano-bridged complexes: (i) one-dimensional (1-D) chains {[Dy2[W(CN)8](L)3(H2O)3(CH3OH)]·6CH3OH·4H2O}n (1DyW) and {[Dy2[Mo(CN)8](L)3(H2O)4]·15H2O}n (2DyMo); (ii) tetranuclear clusters {[Dy[Mo(CN)8](HL)2(H2O)2]}2·14H2O (3DyMo) and {[Er[Mo(CN)8](HL)2(H2O)2]}2·14H2O (6ErMo); (iii) a trinuclear cluster {[Er2[W(CN)8](L)3(H2O)4]}·4CH3OH·4H2O (4ErW); and one bimetallic cation–anionic pair {[Er(HL)2(H2O)4]·[Mo(CN)8]}·7H2O (5ErMo) were obtained. Single-crystal X-ray diffraction analyses show that 1DyW and 2DyMo crystallize in the monoclinic space group and form neutral cyano-bridged chains; 3DyMo and 6ErMo are isostructural complexes that form a rare example of square-type d–f complexes; 4ErW is a discrete trinuclear complex, and 5ErMo consists of a {Er(HL)2(H2O)4}3+ cation and a [Mo(CN)8]3– anionic moiety. Interestingly, one of the two pyridyl groups in β-diketone ligands is protonated during the formation of 3DyMo, 5ErMo, and 6ErMo, which is uncommon in related complexes. Magnetic analyses reveal that 1DyW, 2DyMo, 5ErMo, and 6ErMo show field-induced single-molecule magnet (SMM) behaviors, and 3DyMo is a typical SMM with an energy barrier of 119.6 K under zero dc field. Ab initio calculations were performed on these series of {LnIII–MV} heteronuclear complexes in order to provide more insights into the magnetic exchange interactions between 4d and 4f centers and their influences on the magnetic relaxation properties.