The crowd fought to get close to Seif al-Arab Gadhafi's coffin as it was taken out of a black hearse and placed near a cemetery in Tripoli.
"Revenge, revenge for you Libya," shouted the crowd around the coffin, which was draped in the green Libyan flag and was topped with a wreath of flowers that were wilting in the heat. "We demand revenge for our martyrs."
Libyan officials said the 29-year-old was killed late Saturday along with three of Gadhafi's grandchildren when NATO bombed the family's compound in Tripoli. Gadhafi and his wife were present during the attack but were unharmed, they said.
Libya has denounced the attack, calling it an assassination attempt and a violation of international law.
Some other countries also criticized the strike, saying it exceeded the U.N. mandate of protecting civilians in Libya. The U.N. approved the implementation of a no-fly zone in Libya in March after Gadhafi used aircraft to attack protesters who demanded his ouster.
Also Monday, angry mobs set fire to the Italian and British embassies in Tripoli. The embassy attacks prompted the United Nations to pull its international staff out of Tripoli.
The Associated Press contributed to this report.