Ai told reporters that watching 24-year-old Nour Al Khzam play was "very touching", adding that "it tells the world that art will overcome the war".
"She has been victimised by these wars. She has not had the chance to touch a piano in three years. She and her husband have been separated for one and a half years" said the artist.
"We want to reveal a new image of them, to relay possibility, art and imagination. This is the image that needs to be relayed to the world."
Greek authorities estimate that 12,000 people are stuck at the camp at Idomeni but thousands more are camped out in fields nearby, waiting in vain for the border to reopen so they can continue their journey north.
Macedonia and several other countries on the migrant trail have sealed their borders over recent weeks, leaving the Greek government to struggle with a huge bottleneck of people stuck on its territory.
Ai Weiwei's performance was the latest in a series of projets to denounce European politicians' handling of the worst migrant crisis since World War II.
Last month, Ai draped thousands of lifejackets discarded by migrants arriving on Greece's Lesbos island around the columns of Berlin's Konzerthaus concert hall.
In January the artist closed down an exhibition of his work in Copenhagen in protest at a controversial law allowing authorities to seize valuables from asylum seekers and he frequently visits the Greek island of Lesbos, where boats full of people arrive daily from Turkey.
Interviewed by Al Jazeera on Thursday he said that Europe's response to the crisis was stripping refugees of their basic human rights.
"Refugees are not slaves - they have dignity, they are just like you and me. They come from the war, a war caused by many, many politicians for all kinds of reasons. But they are the victimised by this war. They come to Europe just for a moment of peace." he said in the televised report.
Ai has been exhibited around the globe but his works have often run afoul of Communist Party authorities in China.
He was detained in 2011 for 81 days over his advocacy of democracy and human rights as well as other criticisms of the government in Beijing.
Ai Weiwei was last in France in February to create an installation for a department store in Paris.