The lines written by him will be used in a speech which will be made by on screen prime ministerial candidate Aditya Singhania, played by Neil Bhoopalam in the show, which went on air Friday night.
"The speech is extremely impactful and lays focus on the future and development of the nation," said a source close to the show.
In the speech, he hits upon issues such as how can one deal with the nation's poverty and with the number of people who sleep on empty stomachs in the country every day.
"24", the Indian version of the popular US suspense thriller series of the same name, is aired on Colors. The show stars Anil Kapoor in the lead role as Jai Singh Rathod, the Indian counterpart of Jack Bauer.
Other Bollywood celebrities in the show include Tisca Chopra, Anupam Kher and Mandira Bedi.
Akhtar's wife, Shabana Azmi, will also be seen in a cameo on the show.