Yes, Guy de Maupassant was indeed involved in a war. He fought for the French army during the Franco-Prussian War of 1870-1871. During this conflict, he was wounded and contracted typhoid fever, which left him with lifelong health problems.
The Master of the Short Story: A Quiz on Guy de Maupassant