The radical artists said they were protesting the views expressed by the Czech president, including his opposition to letting children with special needs study with other children.
The red shorts were the proper flag "for a man who has no shame," the art group known as Ztohoven said in a statement on Sunday.
The president also sparked controversy with his recent warning that refugees might bring terrorism and infectious diseases when coming to Europe. Earlier, Zeman was pelted with eggs for his pro-Russia stance in the Ukraine crisis.
The activists behind the underwear stunt said that they had chosen the red boxers because it was the color of the Chinese flag, referencing Zeman's recent visit to China and his praise of Chinese leaders.
Three people were detained over the incident at the famous Prague Castle, according to the police.
Presidential spokesman Jiri Ovcacek condemned the underwear episode, warning against "fascism" and lack of respect towards state symbols.
"I have only words of contempt and revulsion," he wrote on Facebook.
The Ztohoven organization is well-known for their social commentary, most famously for hacking Czech state broadcaster to show a fake nuclear explosion in 2007.
dj/sgb (AP, MIA)