The film's director Anurag Basu also added his vocals to the track entitled 'Phataphati' which has been recorded in Bengali and Hindi.
According to the Hindustan Times a source said: "The moment Ranbir stepped behind the microphone in the studio, everyone was impressed with his enthusiasm. He had a great time recording it."
The song was originally intended for the film's closing credits, but it was decided that, since Barfi! is a deaf-mute, it would be out of character to see him singing.
"As we had already recorded the song and shot the video, we decided to release it at a later stage," explained the source.
"It will be available on the internet today onwards and will be aired on television later this week as well."
The Rockstar actor recently revealed that he had struggled with working out how to dance as a deaf character in Barfi!.
Kapoor has previously recorded a track for the film Anjaana Anjaani.
Barfi! releases on September 14.