Play video content EXCLUSIVE TMZSports.com

The San Francisco 49ers booted a fan and his service dog from Levi's Stadium which made the fan have a seizure ... according to the lawsuit he's now filed against the team.

James Hilburn says he and his Alaskan malamute, Bear, had no problems entering the Niners-Cardinals game on November 29 -- the ticket taker let them in, no questions asked. In his suit, Hilburn says he suffers myoclonic dystonia ... which causes seizures. Bear is trained to alert him and people nearby when one is about to hit.

In the lawsuit, James says once he entered the staidum, police and security guards surrounded him and said Bear was not allowed to be there -- and the stressful situation triggered a seizure.

TMZ Sports obtained video Hilburn's friend shot, and you can hear Bear yelping a warning. Police and stadium staff attempted to get a shuttle to pick them up, but Hilburn declined. He did end up suffering, and had to be hospitalized, according to his lawyer Mark Thomas.

Hilburn wants the team to pay for violating the Americans with Disabilities Act.