Lawyers for Senator Hanson said she told the federal Greens deputy leader to go back to Pakistan in response to a provocative, offensive tweet about the death of Queen Elizabeth II.
Faruqi is suing the One Nation leader in the Federal Court over alleged racist discrimination through a September 2022 tweet.
At the time, Senator Hanson wrote that she was appalled and disgusted with Senator Faruqi's comments, telling her to "pack (her) bags and piss off back to Pakistan".
She had responded to an earlier tweet by Senator Faruqi, who wrote she could not mourn the passing of the leader of a "racist empire built on stolen lives, land and wealth of colonised peoples".
As the trial began on Monday, Senator Faruqi's barrister Saul Holt KC said the tweet was targeted towards his client as, a Muslim woman of colour who had migrated to Australia.
The "demeaning and insulting" language caused people like Senator Faruqi and others to feel a range of psychological effects, including fear, anxiety and stress, Mr Holt said.
The tweet had to be understood in the wider context of racism, which was "pernicious and deeply harmful", as well as the One Nation leader's tendency to say racist things, he told Justice Angus Stewart.
In an affidavit, Senator Faruqi says she felt like she was not accepted in Australia and became fearful of the hate and racism that Senator Hanson's tweet would encourage.
"A tweet of this kind in the Twittersphere, the dogwhistle doesn't just stand on its own," Mr Holt said.
Under cross-examination, Senator Faruqi was taken to a December 2017 tweet by her son Osman.
"Mediocre white people. They should be in the bin, but instead, they own everything but are every f***ing where," he wrote.
She denied the post was racist.
"Racism when it's about people's ethnicity and skin colour is also about who holds power in this country," she told the court.
Senator Hanson's barrister Sue Chrysanthou SC suggested the Greens deputy leader, despite saying she was against all racism, found some forms "acceptable".
Senator Faruqi is seeking court orders the One Nation leader donate $150,000 to a charity of the Greens senator's choice.