Police say the needle was discovered after the child bit into the small chocolate bar on Saturday evening. The 10-year-old wasn't injured.
The candy bar was collected from the Thistledown area of Barrhaven on Halloween. Police found no other tampered pieces of candy.
On Friday, police reported an Ottawa resident found a sewing needle in a potato as he was peeling it.
The Ottawa cases are not believed to be linked to similar cases in Atlantic Canada.
Earlier this fall, seven needles were discovered in potatoes sold in stores throughout Atlantic Canada, as well as in a number of potatoes processed at the Cavendish Farms French fry plant in New Annan, P.E.I.