For China, Tuesday marks the day Japan began its occupation of parts of mainland China in 1931.
"Today is our day of shame," said a Beijing protester, Wei Libing, a waiter in his 40s.
"Wipe out all Japanese dogs," read one banner held up by one of thousands of protesters marching on the embassy, which was ringed by riot police standing six rows deep. Japan's foreign ministry said some embassy windows had been smashed.
Sino-Japanese ties have long been plagued by China's bitter memories of Japan's military aggression in the 1930s and 1940s and present rivalry over resources - the islands are believed to be surrounded by energy-rich waters.
Rowdy protests sprang up in other major cities including Shanghai, raising the risk they could get out of hand and backfire on Beijing, which has given tacit approval to them through state media. One Hong Kong newspaper said some protesters in the southern city of Shenzhen had been detained for calling for democracy and human rights.
China said it wanted a peaceful outcome. "We still hope for a peaceful and negotiated solution to this issue and we hope to work together and work well with the Japanese government," Defence Minister Liang Guanglie said after meeting Panetta.