Raikkonen announced he would miss the remaining races in the United States and Brazil in order to have back surgery ahead of his return to Ferrari next season.
Kovalainen returns to racing action for the first time since the end of last season, when he lost his seat at Caterham.
The Finn has been acting as a third driver for Caterham this year, with practice outings in Bahrain, Spain, Belgium, Italy, Japan and Abu Dhabi.
Lotus decided against using reserve driver and GP2 champion Davide Valsecchi, although it said it had "every faith" in his abilities.
"Obviously we had to move quickly following the news of Kimi's non-participation in the final two races of this season, and we found ourselves facing a difficult decision in terms of who should take the wheel in Austin and Sao Paulo," said team boss Eric Boullier.
"On the one hand we had our reserve driver Davide Valsecchi - who is a talented young driver that has shown a great deal of promise - and on the other we had the opportunity to bring in a seasoned Formula 1 competitor in Heikki.
"Whilst we have every faith in Davide's abilities, we are obviously involved in a tight constructors' championship battle, so it was decided that the experience Heikki could bring to the team would be invaluable as we aim to finish the year in the best position possible."
Kovalainen added: "It is a fantastic opportunity for me to join Lotus for the final two races of 2013.
"We've seen this year that the E21 is a car which can win races and finish on the podium, so I will be pushing hard for the best results possible.
"Jumping into a car so late in the year when you have not been competing in the races all season will be a challenge, but I know the team at Enstone well so I have no concerns about getting up to speed.
"This is a great opportunity for me, so I would like to thank Tony Fernandes and Caterham F1 Team for allowing me to take advantage of it."