The actor visited the city of Patna in the state of Bihar in November (11) to record a short film for charity UNICEF's Soccer Aid project.
And the Trainspotting star, who describes the culture shock after arriving in the country as "a real assault on the senses", admits he found it difficult to believe families can live in such squalid conditions.
In article for Scotland on Sunday, he writes, "I expected to be overwhelmed by the poverty and I was. It is difficult to comprehend, seeing people living and sleeping on the streets everywhere you look. As we were driving through the city I saw children everywhere, playing in places that children should not be playing. Places covered in rubbish and faeces. It made me realise how incredibly difficult these children's lives are."
McGregor visited the region to see UNICEF's work helping to lower the rate of child death in the area, where almost half the population lives below the poverty line, and he also took a trip to a local hospital.
He adds, "The unit I was visiting was at the end of a short, traffic-choked lane in the centre of the town. I had expected the whole place to be filled with the noises of babies crying, but as soon as we stepped inside I was taken aback by the silence. All the babies were so fragile that their tiny bodies didn't have the energy to make any noise...
"It's terrible. Some babies don't make it. That's what happened for one mum I met in the centre, Musken. She was barely older than a child herself, but she had waited four weeks: 28 long days and nights, without leaving that bus shelter of a waiting room to find out if her baby Munna would survive, only for him to finally lose his struggle for life. It shouldn't be like that. No baby should lose their life in that way."