The stability of solution-processed semiconductors remains an important area for improvement on their path to wider deployment. Inorganic caesium lead halide perovskites have a bandgap well suited to tandem solar cells1 but suffer from an undesired phase transition near room temperature2. Colloidal quantum dots (CQDs) are structurally robust materials prized for their size-tunable bandgap3; however, they also require further advances in stability because they are prone to aggregation and surface oxidization at high temperatures as a consequence of incomplete surface passivation4,5. Here we report ‘lattice-anchored’ hybrid materials that combine caesium lead halide perovskites with lead chalcogenide CQDs, in which lattice matching between the two materials contributes to a stability exceeding that of the constituents. We find that CQDs keep the perovskite in its desired cubic phase, suppressing the transition to the undesired lattice-mismatched phases. The stability of the CQD-anchored perovskite in air is enhanced by an order of magnitude compared with pristine perovskite, and the material remains stable for more than six months at ambient conditions (25 degrees Celsius and about 30 per cent humidity) and more than five hours at 200 degrees Celsius. The perovskite prevents oxidation of the CQD surfaces and reduces the agglomeration of the nanoparticles at 100 degrees Celsius by a factor of five compared with CQD controls. The matrix-protected CQDs show a photoluminescence quantum efficiency of 30 per cent for a CQD solid emitting at infrared wavelengths. The lattice-anchored CQD:perovskite solid exhibits a doubling in charge carrier mobility as a result of a reduced energy barrier for carrier hopping compared with the pure CQD solid. These benefits have potential uses in solution-processed optoelectronic devices.