Jack Mills, 18, appeared before South Tyneside Magistrates' Court charged with possessing a knife in a public place.
The court heard how Mills panicked and ran off from police officers near his Elberfeld Court home in Jarrow, and went on to drop the knife from his pocket.
Glenda Beck, prosecuting, said police were called to the defendant's family home on August 10 following reports of a disturbance.
Man in life-threatening condition after 'serious collision' involving car and pedestrian in South Shields
Campaigners rally against Local Plan after farmland in Cleadon earmarked for 156 homes
Appeal to find owner of lost Labrador after dog found near Jarrow Cemetery
Pair set up cannabis farm in town centre flat
South Shields man jailed for terrifying physical and sexual assault on woman in her own home
She said when police arrived they were pointed by neighbours to the house where Mills was in the doorway.
Police spoke to the defendant's mother who confirmed there was no violence, it had just been an argument.
Officers asked Mills to talk to them in the car because it appeared he was wanted in connection with another incident.
She said: "He dodged past and went to run away. When officers got around the corner, they saw Mills drop a knife from his pocket."
The teenager was arrested and later charged with having the knife in public.
However, Jason Smith, defending, said his client never had any intention of taking the knife outside and added it is one he uses in his own home to self harm due to his mental health problems.
He said his client suffers from panic attacks and panicked when he was told he was wanted for something else and it turned out he wasn't wanted by the police at all.
Mr Smith said the knife was in the defendant's pocket and he dropped it when he realised he had it on him outside.
He said: "This is not a young man who walks the streets with a knife. He does not harm himself outside and he does not take the knife outside. If he hadn't panicked and ran away this would not have happened."
Mr Smith said Mills is supported by his family and is getting professional treatment for his mental health issues.
Magistrates gave Mills a 12-month conditional discharge and ordered him to pay £85 costs and a £21 victim surcharge.