Liu Yongfu () (1837–1917) was a Chinese warlord and commander of the celebrated Black Flag Army. Liu won fame as a Chinese patriot fighting against the French Empire in northern Vietnam (Tonkin) in the 1870s and early 1880s. During the Sino-French War (August 1884–April 1885) he established a close friendship with the Chinese statesman and general Tang Jingsong, and in 1895 he helped Tang organise resistance to the Japanese invasion of Taiwan. He succeeded Tang as the second and last president of the short-lived Republic of Formosa (5 June–21 October 1895).