In a conversation with her "in her retirement", Mr Carr said the former UK prime minister had warned Australia against Asian immigration.
She said "if we allowed too much of it we'd see the natives of the land, the European settlers, overtaken by migrants", he said.
Lady Thatcher, 87, died on Monday after suffering a series of strokes.
Mr Carr made his comments on the Australian broadcaster ABC's Lateline programme.
He said he had been "astonished" at the comments by Lady Thatcher, which were made while his Malaysian-born wife Helena was "standing not far away" but was "fortunately out of earshot".
But he said he retained respect for the "boldness of her political leadership".
Mr Carr prefaced his comments by saying Lady Thatcher had been "the most significant" leader since Winston Churchill, forcing social democratic parties to "think more deeply about the function of the state". She had been "right in joining [former US President Ronald] Reagan and denouncing the old Soviet Union as an evil dictatorship", he said.
"On 100 other things I would pick arguments with her and I recall one conversation I had with her in her retirement where she said something that was unabashedly racist, where she warned Australia - talking to me with Helena standing not far away - against Asian immigration, saying that if we allowed too much of it we'd see the natives of the land, the European settlers, overtaken by migrants.
"I couldn't believe it. It reminded me that despite, yes, her greatness on those big questions, the role of the state, the evil nature of the Communist totalitarianism, there was an old-fashioned quality to her that was entirely out of touch and probably explained why her party removed her in the early 90s."
He went on to recall: "I remember one thing she said as part of that conversation, she said: 'You will end up like Fiji.' She said: 'I like Sydney but you can't allow the migrants' - and in context she meant Asian migration - 'to take over, otherwise you will end up like Fiji where the Indian migrants have taken over.'
"I was so astonished I don't think I could think of an appropriate reply."
Lady Thatcher will be buried with full military honours at London's St Paul's Cathedral on Wednesday 17 April.
Australia's Foreign Minister Bob Carr has described comments made by Baroness Thatcher as "unabashedly racist".