The 39-year-old said he genuinely believed that he would "blend in" with pupils when he dressed as a schoolgirl to visit a high school near his Tokyo home.
Mr Nanpei, who is nearly 6ft tall, wore a wig, make-up and an oversized uniform ordered over the internet. But his disguise failed to convince Niiza Senior High pupils.
According to The Asahi newspaper, Mr Nanpei told police: "I came near the school because I wanted to show off my appearance in the uniform... But some students saw me and started to scream."
They screamed louder when a school administrator gave chase and the imposter's wig fell off.
He was arrested for entering the school without permission.