Nastase was quoted by Romanian and some British media last week as saying in response to William's pregnancy announcement: "Let's see what colour it has. Chocolate with milk?"
Williams responded on Instagram, in a statement that Mercedes driver Hamilton repeated to his 4.1 million followers on Thursday, condemning the Romanian's remarks, which she called "racist".
"Does my sassiness upset you? Why are you beset with gloom? You may shoot me with your words...you may try to kill me with your hatefulness, but still like air I will rise," she wrote, quoting from a poem by the black American writer Maya Angelou.
Hamilton, who has 'Still I Rise' - the title of the same poem - tattooed across his back, is friends with Williams and invited her to last year's Mexican Grand Prix.
"I've only just heard about it today," the Briton, who has West Indian ancestry, told reporters at the Russian Grand Prix when asked about the story.
"I'm very much with her in what she said and I thought it was beautiful what she wrote, as a powerful independent black woman I just think she's awesome.
"She's not only one of the greatest people I know, she's just a born leader...reading what she's written just inspires me and hopefully inspires others."
Williams won the Australian Open in January, her 23rd grand slam title, while pregnant. She is now taking maternity leave for the rest of the tennis season.
The world's highest paid female athlete announced her engagement to Reddit co-founder Alexis Ohanian last December. (Editing by Hugh Lawson)
Read the original article on Eurosport: Hamilton inspired by Serena's response to Nastase