The Dragon Boat Festival commemorates the life and death of the ancient patriot-poet, Qu Yuan, who lived from 340-278 B.C. during the Warring States period of China. Qu Yuan was a minister who advocated reforms in his home state of Chu. The King fell under the influence of other corrupt, jealous ministers who slandered Qu Yuan. He refused to listen to Qu Yuan's advice and instead banished him from the state of Chu.
Qu Yuan went into exile in the state of Jiangnan. While in exile, he spent much of this time collecting legends and rearranging folk odes while travelling the countryside, producing some of the greatest poetry in Chinese literature while expressing his fervent love for his state and his deepest concern for its future. In 278, Qu Yuan's home had been invaded. Overcome by sadness, he committed suicide by throwing himself into the Miluo River on the fifth day of the fifth moon. The people of Chu, learning of his suicide, rushed out in their fishing boats to the middle of the river and tried desperatedly to save him. They beat drums and splashed water with their paddles in order to keep the fish and evil spirits from his body, and later on, they scattered rice into the water to prevent him from suffering hunger and also to feed the fishes in the river so that they would not devour his body.
The act of searching for his body in the boats gradually turned into the tradition of the Dragon boat race, which is held every year on the day of his suicide. Dragon boats are raced on rivers in China and the surrounding countries. During these festivals, people will throw "zhongzi" (rice dumplings) into the river to honor the memory of Qu Yuan.
Even before Qu Yuan, the fifth moon was known as a time of danger. In ancient China, the hot, humid weather of summer was a time of pestilence and disease. To ward off illness, people attached bundles of artemisia and calamus to their homes, and posted pictures of the demon catcher Zhong Kue. The people considered themselves to be the descendants of dragons and so during the fifth moon, they feel it is appropriate to paddle boats with dragon designs and make sacrifices of zhonzi to cajole the river dragons.
You can learn more about Qu Yuan from this video by Panda Express: