A 12-year-old boy was charged with attempted robbery after he alledgedly held a gun to a teen’s head to demand chicken nuggets at an East Harlem subway station, police said.

The boy, who a police source said goes to school in the area but lives in Westchester, allegedly asked the 13-year-old girl for a nugget at a McDonald’s near East 103rd Street and Lexington Avenue on Tuesday afternoon.

She said no and left to catch an uptown No. 6 train about 5:40 p.m., police said.

But the boy allegedly followed her there and pulled out a gun, holding it up to her head.

“Give me a chicken nugget,” he allegedly said. Police said the girl told him to leave her alone and no one got hurt.

The incident was reported the next day to school administrators at the children’s upper Manhattan school, the source said.

The boy, who was not named, was charged as a minor.