The man surnamed Liu, 26, was taken into custody for video voyeurism after installing the spy camera in the bathroom of his rented flat, which he shared with two men and four women, the Beijing Times reported.
The roommates notified police on October 22 after one of the women noticed a blinking red light shining from behind some clothes while soaking in the tub.
Officers arrived at the apartment, where they said Liu became noticeably nervous.
"It seems he wasn't too familiar with how to use the camera because he shot himself installing it," police said.