Hamilton has since deleted the Instagram post, which showed his nephew wearing a purple and pink outfit and carrying a pink wand with a heart on it.
He was heavily criticised for negatively stereotyping his nephew on the basis of his gender.
On Tuesday Hamilton told his 5.2 million followers on Twitter that he regretted his “unacceptable” post.
In the video he posted on Instagram, he said: “I’m so sad right now. Look at my nephew,” , as the camera focuses on the boy.
“Why are you wearing a princess dress? Is this what you got for Christmas?” he asks, as the boy nods delightedly.
“Why did you ask for a princess dress for Christmas?” he goes on.
“Because it’s pretty,” the boy replies enthusiastically, waving the pink wand.
“Boys don’t wear princess dresses!” says Hamilton.
The 32-year-old was abroad celebrating Christmas with his family when he posted the video.
In response, Travis Alabanza, a performance artist, had said: “I hope Lewis Hamilton properly thinks and apologises to his nephew for that video.”
In November the Guardian revealed that Hamilton avoided paying tax on his £16.5m private jet by using an Isle of Man scheme that is to be investigated by HM Revenue and Customs.
Before that, his use of social media has caused various controversies, from saying “this s— is killing me” on Snapchat during a Formula One press conference in Japan, to taking selfies while riding a Harley-Davidson in New Zealand.