'With a heavy heart, I apply that the accused be discharged,' he said.
Legal sources in Kano said the country had been under pressure to drop the case which angered human rights groups.
Police previously said Wasila had 'admitted' murdering her 35-year-old husband by signing a confession she could not read - with her thumbprint.
Prosecutors had been seeking the death penalty for the teenager, whose farmer husband was found dead just days after marrying her in April last year.
If she had been found guilty, the teenager - who is from a poor and deeply conservative Muslim family and cannot write - could have become the 1st child in Nigeria to be executed in 18 years.
Human rights campaigners continually expressed outrage over her treatment, saying she should be seen as a victim of abuse.
But the case prompted mixed reactions in her impoverished home state of Kano, where Sharia (Islamic) law is in place alongside the laws of the government.
That, claim some followers, allows child marriage - and 14 is a normal age for a bride.
One of the prosecution witnesses was the farmer's 2nd wife Ramatu, who told how her 'co-wife' prepared him dinner before being due to go to bed with him.
The court had heard the murder victim had married Ramatu previously in the village of Unguwar Yansoro, which sits in a region where polygamy is widespread.
Ramatu said she got along well with the 14-year-old and the two had prepared food together on April 5, 2014 the day Sani died.
Because it was Wasila's turn to share a bed with her new husband, she was also entitled to serve him his meal.
'After putting the food in the dish I didn't see anybody put anything in it,' Ramatu said - but later she saw her husband foaming at the mouth and unable to walk.
Previously a 7-year-old girl who Wasila allegedly sent to buy rat poison was called to give evidence.
Identified only as Hamziyya, the young girl - believed to be Ramatu's sister - was living in the same house as the 14-year-old and her new husband at the time of his death.
'She said rats were disturbing her in her room,' Hamziyya told the court.
Shopkeeper Abuwa Yusuf confirmed selling poison to the girl, and neighbour Abdulrahim Ibrahim said: 'When [Sani] brought the food I noticed some sandy-like particles, black in colour'.
The neighbour ate 4 of the small balls made of bean paste but 'was not comfortable with the taste', he said, adding: 'It was only Umar (Sani) who continued eating.'
Previous court reports suggested 3 other people had died after allegedly eating the contaminated food, but all 4 deaths had been combined into 1 murder charge.
The case has raised the spectre of child marriage in Nigeria, where campaigners say almost 2/5 of children are married off before their 18th birthday.
Some 16 per cent are married before they turn 15, according to the campaign group Girls Not Brides - and the rates are the highest in the north, near where Wasila lived.
Hussaina Ibrahim from the International Federation of Women Lawyers (FIDA), who is representing the teenager, previously told The Guardian: 'We are against the trial. The whole process violates her fundamental rights.
'The UN Convention on the Rights of the Child says she should be in education. She should be in school'.
But others including the 14-year-old's own relatives have rejected the notion she was forced into marriage.
They have said that 14 is a common age to marry in the deeply impoverished region and that she chose Sani from among many suitors.
A motion by defence lawyers to have the case moved to juvenile court was rejected, despite claims by human rights activists that she is too young to stand trial for murder in a high court.
The use of Sharia law has also made the case more complicated, because there are no guidelines saying where Islamic law ends and state law begins.
According to Human Rights Watch, Nigeria is not known to have executed a juvenile offender since 1997, when the country was ruled by military dictator Sani Abacha.