He said the incident happened before the Duke of Edinburgh Stakes, which was Friday's final race.
"It only just missed my horse. I'd have only been two or three metres from the rail, and he meant it," Atzeni told BBC Radio 5 live.
Crowd behaviour was in the spotlight after images of a fight at the track on Thursday went viral online.
"I was cantering down on the way to the start and some fella threw a plastic glass with beer in it," said Atzeni, who won the preceding Queen's Vase on Stradivarius.
"I was going to go back, but it's difficult to go back because I couldn't see who did it."
A report from the Ascot stewards said they held an inquiry and viewed a recording which showed a plastic glass being thrown from the area of the half-furlong marker.
"They noted the explanation of the clerk of the course that Ascot will try to establish during their post-race debrief with the security staff whether they can identify who threw the object," said the report.
More security staff will be deployed to the area and a report forwarded to the British Horseracing Authority.
Jockey Andrea Atzeni says a Royal Ascot racegoer threw a pint of beer at him as he made his way to the start of a race.