Tendulkar, widely regarded as one of the world's best batsmen, will play himself in "Vighnaharta Shri Siddhivinayak," a film about the god, who is also referred to as Siddhivinayak.
"He will play a small role, as himself, either in a song sequence or in an actual scene," said Rajiv Sanghvi, whose company is handling the film's production.
Tendulkar's office confirmed the cricketer would be shooting for the film after he returns from Sri Lanka where India is touring at the moment.
Tendulkar, a devotee of Ganesh, had offered to be a part of the project and will not be charging for the role, Sanghvi said.
The film is being produced by the Siddhivinayak Temple Trust, which looks after a famous temple dedicated to Ganesh in Mumbai.
"Sachin has been a regular at the temple for many years now and he never gives up an opportunity to show his devotion," said Subhash Mayekar, chairman of the trust.
"Vighnaharta Shri Siddhivinayak" is due to begin shooting next month, and will also feature a voice-over by Bollywood icon Amitabh Bachchan.