The Brooklyn gym teacher fired for playing the popular online game “Fortnite” with students is suing to get his job back.

Brett Belsky says in his Manhattan lawsuit against the Department of Education that he was just being an inspirational educator when he scrawled his gamer handle on the board in January 2018, and told his MS 890 students he’d play with them if they got their grades up.

“As any great educator would do, Mr. Belsky sought the best ways to motivate and connect with his students,” the just-filed suit reads. “In the Spring of the 2017-2018 school year, Mr. Belsky overheard his students talking about an internationally popular videogame called ‘Fortnite.'”

“At the same time, he found some of these students were not focusing on their school work. In sum and substance, he stated to them ‘…if you pay attention, and do well in class, you could play against me online,'” the papers continue.

“He wrote his username for the popular game on the classroom board. He also discussed this tactic, and another involving giving an autographed hockey puck as a reward, with the mother of ‘Student A,’ at a parent teacher conference.”

But his “games for grades” strategy blew up when the creeped-out father of “Student A” notified the principal that the grown man was playing games with his kid online.

Belsky, 29, says he was unfairly dispatched to the Education Department’s rubber room as he was investigated — and that probers found nothing. Instead, the papers claim, the department “looked to build a false narrative about Mr. Belsky’s conduct outside the ‘games for grades’ investigation.”

“The report did not indicate that anything inappropriate took place between Mr. Belsky and the student. In fact, when asked about Mr. Belsky’s tactics with her son, the SCI Report indicated, ‘Mother A felt this conduct was appropriate and motivational,'” according to the filing.

Belsky also claims the DOE couldn’t even categorize his alleged misconduct, because their current guideline system doesn’t account for the online atmosphere.

He also alleges that officials wrongfully tarred him with three disciplinary letters — one for “spinning a girl” in gym class, another for accepting a hug from a student, and a third for saying he wanted to “adopt” a student. Belsky denies ever saying he wanted to adopt the child.

Belsky is asking a judge to order the DOE to give him his job back, to renew his teaching license, and to erase the allegations from his record. He’s also requesting attorney fees and back pay.

“Mr. Belsky was terminated based on his overall performance, including a review of this case,” a DOE spokesman said in a statement. “We will review the lawsuit.”

Belsky’s lawyer, Bryan D. Glass, declined to comment on his client’s behalf.