Jordan Hadden, 28, of Tollcross in Glasgow, was sentenced at Glasgow Sheriff Court after pleading guilty to conducting himself in a disorderly manner, breach of the peace, and culpable and reckless conduct.
The incident took place on 8 March following Rangers' Scottish Cup quarter-final defeat to city rivals Celtic on penalties. After Celtic fans initially entered the pitch from the Broomloan Road stand, Hadden, who was in the Copeland Road stand, overcame security barriers and entered the field. He was seen turning to the crowd and waving his arms repeatedly, appearing to encourage other Rangers fans to join him.
Hadden then crossed the pitch and approached a police cordon. He picked up an orange bottle and threw it towards the Celtic fans. Prosecutor Abbas Ali told the court that the bottle narrowly missed a police officer, who was forced to take evasive action to avoid being struck.
"An unknown police officer was seen to take evasive action to avoid being struck with the bottle which narrowly avoided hitting the officer," Mr Ali said.
Hadden became lost in the crowd but was later identified by CCTV, including footage from broadcaster Premier Sports.
Defending, John McLaughlin told the court his client was under the influence of alcohol, which affected his recall of the events. He said Hadden had "got caught up in a fertile atmosphere" and picked up the bottle in "the spur of the moment".
"In the cold light of day, he knows his behaviour was extremely reckless and dangerous and could have caused an injury," Mr McLaughlin said. "He is fortunate no one was struck."
Sentencing Hadden, Sheriff Lorraine Glancy KC said: "Had the officer not seen the bottle and taken evasive action, he could have been struck on the head with it. Officers that day kept fans separate, preventing disorder and are to be commended for their bravery and professionalism. I consider that a prison sentence is appropriate to deter others from behaving in this way and to reflect the public's disapproval for behaviour like this at football matches."
Hadden was also served with an eight-year football ban.