According to the search results, Lucius Malfoy was a Death Eater who actively participated in the first wizarding war as Voldemorts second-in-command. After Voldemorts downfall on the fateful night of Halloween in 1981, many Death Eaters were captured, but Lucius avoided being imprisoned by claiming that he was under the Imperius Curse throughout the war. He managed to retain his position among the social elite but still remained a power-hungry bigot. Lucius is also mildly abusive towards Draco, who desperately seeks his father’s approval. Hence, it is only inevitable that he follows his footsteps, and is determined to do Voldemort’s bidding when he gets the chance.
In the Battle of Hogwarts, Lucius abandoned his loyalty to Voldemort to protect his family, and was pardoned for his crimes due to his last-minute defection. The Malfoys were able to avoid serving time in Azkaban, as they provided evidence that helped the Ministry track down the Death Eaters who had fled after the war. It is also probable that, since Narcissa’s lie to Voldemort saved Harry’s life, the family was pardoned for their crimes after Voldemorts final defeat and did not serve a stint in Azkaban.