The move, the most dramatic in a series of investigations against top regime officials, comes just hours after former President Hosni Mubarak, 82, was hospitalized with heart problems as he too was to be questioned by prosecutors.
Gamal Mubarak, his younger son, was a top official in the ruling party and was widely seen as being groomed to succeed his father before 18 days of popular protests brought down the regime on February 11.
While the ex-president was in the hospital in the Red Sea resort of Sharm el-Sheikh where he has been living since being removed from power, his sons were taken for questioning to the nearby courthouse by prosecutors from Cairo.
An angry crowd of 2,000 people gathered outside and demanded the two be arrested.
Then, in the early hours of the morning, the head of provincial security in the South Sinai told the crowd that Gamal and his businessman brother Alaa would be detained.
"Brothers, whatever you wanted, you have got ... 15 days," said Maj. Gen. Mohammed el-Khatib, as the crowd erupted in cheers.
As a police van with drawn curtains took away the two brothers, the crowd pelted it with water bottles, stones and their flip-flops, a sign of disrespect in the Arab world.
The increasing role of Gamal Mubarak in the government over the last decade and the belief that he might succeed his father helped galvanize Egypt's protest movement.
At least 800 people are estimated to have been killed during the protests as police opened fire on the crowds.
Authorities are now investigating government officials for their role in ordering the violence.
Gamal is also believed to be the architect of Egypt's privatization program and economic liberalization, which has brought in billions in foreign investment but has also widened the gap between rich and poor.
Many of his close associates were billionaires and held top positions in the ruling party and the government. There are allegations that they used their positions for personal gain.
Mubarak himself has not been detained, but he was due to be questioned by prosecutors when he was admitted to the Sharm el-Sheikh hospital last night complaining of heart problems.
In a sign that his ailment might not be very serious, however, Justice Minister Mohammed el-Guindi said he was then questioned in his hospital suite for his role in the violence against protesters.
The investigation into corruption charges would be carried out later by the Justice Ministry's anti-corruption department, he added.