An 11-year-old boy's anonymous donation to his local police department captured the heart of his community and is inspiring others. Police wanted to thank him for it — but first they had to do a little detective work.

Two days after the 12th anniversary of the terror attacks of Sept. 11, a boy walked into his local police station in Greenfield, Wis., and shook more than $10 in loose change out of his bag. He told the woman at the desk he wanted to make a donation to the police, but walked out before she could get his name.

"You don't expect that every day: Little guy to walk in and throw up his change," Brittany Eickhorst, who was working at the desk, told NBC News. "You know most kids are saving up for an Xbox or this game or that. (It's) just really heartwarming."

Touched by the offering, Greenfield police wanted to thank the mystery boy. So they posted surveillance video of him leaving the money at the station on YouTube and their Facebook page, asking people to identify the benevolent stranger.

They discovered the boy was sixth-grader Max Siepert, who had heard stories in his social studies class about the courage of police and firefighters who responded to the Sept. 11th tragedy. Max also has a family connection to law enforcement, as explained on the Greenfield Police Department's Facebook page.

"We've learned our mystery donor is 11-year-old Max," the police department's Facebook post said. "Max donated the money in memory of his grandfather, a Milwaukee Police Department officer who was killed in the line of duty in 1974. Max rode his bike to the police station without his parents' knowledge and didn't expect the attention. THANK YOU MAX and THANK YOU to your grandfather for his sacrifice."

It turns out the freckle-faced redhead had been saving his money since April, raising some of it via backyard talent shows as well as by soliciting donations from friends and relatives. "One day that's going to make a difference. It might not be a really big difference but at least it's something," said Max, who was interviewed about his good deed by several local TV stations.

Greenfield Assistant Police Chief Paul Schlecht told TODAY.com that he's heard Max has inspired others to donate to the department, and the story has lifted morale. "It's heartwarming. It's nice to see something good instead of all the bad stuff we hear about," Schlecht said.

Greenfield's police chief is expected to meet with Max to thank him personally, and the money will be donated to the Greenfield Police Foundation for equipment or training for police officers. "It's not always how much you give, but the thought behind the gift," Schlecht told TODAY.com. "It's only 10 dollars and three cents, but for a kid that age, it's all his money, and he worked hard for it."

Max's mom offered to match his donation of $10.03, and Max plans to give that donation to a little girl in Wisconsin who needs a kidney transplant. He hopes his gift will encourage others to do the same.

"If every person would do that, we would have such a great world," Max said."It would be awesome. "