The use of building insulation materials is an effective measure to reduce building energy consumption. To improve the sustainability of insulation materials, desert sand (DS) was used to replace part of the binder, and rice husk ash (RHA) was incorporated to further improve the performance of foamed concrete. The fresh properties, strengths, thermal properties and thermal insulation function of DS-based foamed concrete (DSFC) were systematically investigated. The use of DS and RHA to replace part of Portland cement (PC) and fly ash reduces the flowability of the mixture when the water/binder (PC, fly ash, DS and RHA) ratio is constant. Although the incorporation of DS into foamed concrete increases its density and thermal conductivity, it improves the volume stability of the sample. The strength of specimen with DS decreases due to the low reactivity of DS, which also reduces the content of hydration products. Further incorporation of RHA not only improves the matrix strength by increasing the C-S-H content but also improves the pore structure of the DSFC by increasing the yield stress of the paste. The joint application of DS and RHA effectively reduces the heat storage coefficient and thermal inertia index of DSFC, which is beneficial to improve the thermal insulation capacity of buildings and reduce energy consumption. Incorporating DS and RHA can effectively improve the environmental and economic benefits of the foamed mixture, and the unit strength cost and carbon emission per cubic meter of the 5%–10% RHA-modified samples are reduced by 20.3%–39.1% and 20.2%–38.9%, respectively, compared with the DS35. This research provides a new approach and theoretical basis for building energy saving and external wall insulation.