Energy efficiency measures including exterior wall and cavity insulation, biomass boilers and district heating system will be installed.
Glasgow City Council was awarded £6.6m in funding from the Scottish government's home energy efficiency programme and residents will be helped to obtain funding worth an additional £21m.
Sustainable Glasgow also is working with the city's social landlords, which will contribute an extra £12m towards the projects.
Queen Cross Housing Association was awarded £725,000 towards its innovative Ecopod green energy project which will benefit 542 flats and maisonettes in the Woodside area of the city. This is Scotland's first Ecopod district heating systems project. It harnesses solar power and uses energy efficient boilers.
Glasgow City Council leader and chair of Sustainable Glasgow councillor Gordon Matheson said: "Fuel poverty is a big problem in Glasgow and it's something which the council is determined to tackle in partnership with housing providers.
"This new investment of £40m is fantastic news for city residents - many who of whom are living in hard to heat properties. In recent years we have endured some of the coldest winters in living memory and energy costs have been spiralling.
"This funding will enable almost 5000 homes to be upgraded - creating more energy efficient properties which retain heat and allow people to live more comfortably without worrying about energy bills. It will also help tackle environmental issues by reducing emissions."