The PM said the movie is a commendable effort to promote cleanliness in India.
"Good effort to further the message of cleanliness. Over 1.25 billion Indians have to continue working together to create a cleaner India," Modi wrote on Twitter.
In response, Akshay Kumar wrote, "Thank you so much honourable Sir. Hope we succeed in changing mindsets and truly making a difference."
The movie, directed by Shree Narayan Singh, stars Bhumi Pednekar, Anupam Kher and Sana Khan.
The Indian road cleaning operation was also utilized in this film.
The film is set to release on August 11.