The 17-strong group from Whitchurch High School in Cardiff raised eyebrows when they were seen in the morning striding around the school in borrowed skirts.
Protester Tyrone Evelyn, 15, said the group, from Whitchurch High School in Cardiff, would continue campaigning for a change.
"It's just appropriate for the weather, we don't want to be hot and bothered. Over the last few days I've had a few headaches and skin irritations because I've been too hot," he was quoted by The Mirror as saying.
"Girls can wear skirts, so I don't see why we can't wear shorts. It's a reasonable protest," he added.
Tyrone and his friends wore trousers to school with skirts stowed in their bags after they suspected some teachers had got wind of their protest, which they planned on Facebook. They then nipped into the loos and changed, before taking to the school corridors chanting, "we want to wear shorts".
Tyrone's mother Andrea John, 51, said she would be happy to buy school shorts, adding: "It should be optional to wear three-quarter length shorts. It would cost exactly the same as if they wore trousers."
The boys' protest comes a month after train drivers in Sweden made international headlines by wearing skirts to work to protest against a policy that banned shorts. Train company Arriva has since capitulated and changed its policy to say all their drivers can wear trousers, shorts or skirts.
But it seems the protest was short-lived and came to an abrupt end when the boys were marched into the headmaster's office.
Despite rumours that the pupils had been sent home, headteacher Huw Jones-Williams said no-one had been punished.
"We had a conversation with some boys this morning and they have worn trousers," he said.
Britain's Met Office, earlier this week, issued a heatwave alert for London and south-eastern England as the mercury touched 30 degrees Celsius, a record for the year.
Britain is experiencing its first prolonged heatwave since 2006, with six consecutive days of temperatures above 30 degrees Celcius.
Ambulance services across England have reported an increase in call-outs since the hot weather began.
20 Oscar facts: Interesting trivia about the Academy Awards
Photos: Alia Bhatt, Sunny Deol at an event in Mumbai
Photos: Akshay Kumar, Taapsee Pannu promote 'Naam Shabana'
Flashback: When sexy models sizzled in bikinis at Tokyo fashion show
Photos: These Indian cities top the list in online purchase of sex products