It's real. It's one of the old Star Trek animated episodes. In this one (if I recall correctly) the computer has a virus or malfunction that's turned it into a practical joker.
I like how he just left the KIRK IS A JERK shirt on instead of changing. He walked all down the halls of the Enterprise looking like that. And knowing that he looked like that.