After Mao Zedong's death in September of 1976, Hua Guofeng, together with Ye Jianying, Wang Dongxing, and other pragmatic senior veterans, began planning to take "tougher measures" to deal with the Gang of Four. As events came to a head, they chose to take action on the evening of October 6th.
That afternoon, Wang Hongwen, Zhang Chunqiao, and Yao Wenyuan received a notice from Hua Guofeng, asking them to convene the Politburo Standing Committee in Huairen Hall in the Zhongnanhai compound in the evening. That night, Hua Guofeng, Wang Dongxing, and Ye Jianying arrived first; as Zhang Chunqiao, Wang Hongwen, and Yao Wenyuan individually entered the room, Hua, Wang and Ye read aloud the decisions to subject the accused to "separate trials", which were then immediately carried out. Another group of people arrived at Jiang Qing's place of residence to arrest her; elsewhere, Mao Yuanxin, Chi Qun, Xie Jingyi, and others were also subjected to separate trials. Hua Guofeng simultaneously sent people to take charge of public opinion outlets, such as radio stations and the Xinhua News Agency.
After the action had taken place, the Central Committee issued a notice to all Politburo members in Beijing to hold an impromptu meeting. At the meeting, Ye Jianying explained the process and significance of arresting the Gang of Four, and proposed that Hua Guofeng be Chairman of the Chinese Communist Party (CCP) Central Committee and the CCP Central Military Commission. The proposal was passed unanimously.
On October 10th, Deng Xiaoping sent a letter of congratulations to Hua Guofeng. On October 18th, the CCP Central Committee issued the "CCP Central Committee Document (1976) No. 16", informing the entire party that the Gang of Four had been smashed. This marked the official end of the Cultural Revolution.
References: "The World Turned Upside Down: A History of the Chinese Cultural Revolution"; "Mao's Last Revolution"; "Political Struggles During the Age of Reform in China"