Lucius claimed he was Imperiused, avoiding time in Azkaban.
After the Dark Lord disappeared, Lucius proactively claimed his innocence very soon afterwards. Lucius likely realized the possible consequences of being caught for his crimes, and decided to take action and get himself out of trouble. Ron tells Harry when they meet on the Hogwarts express that the Malfoys were some of the first to disavow the Dark Lord after he disappeared, and claimed they were bewitched into it.
“I’ve heard of his family,’ said Ron darkly. ‘They were some of the first to come back to our side after You-Know-Who disappeared. Said they’d been bewitched. My dad doesn’t believe it. He says Malfoy’s father didn’t need an excuse to go over to the Dark Side.”
- Harry Potter and the Philosopher's Stone, Chapter 7 (The Sorting Hat)
Fred and George tell Harry that Lucius Malfoy supported the Dark Lord, but once the Dark Lord disappeared, he “came back saying he never meant any of it”, corroborating what Ron said.
“I’ve heard Dad talking about him,’ said George. ‘He was a big supporter of You Know Who.’
‘And when You Know Who disappeared,’ said Fred, craning around to look at Harry, ‘Lucius Malfoy came back saying he’d never meant any of it. Load of dung – Dad reckons he was right in You Know Who’s inner circle.”
- Harry Potter and the Chamber of Secrets, Chapter 3 (The Burrow)
The only likely way that “not meaning it” could be considered a plausible excuse would be if he claimed to be under the Imperius Curse. The Imperius Curse is used to force people to act against their will, so people who had no intention of serving the Dark Lord could be made to do so against their will. The Death Eaters used the existence of the Imperius Curse to their advantage after the Dark Lord’s disappearance - some of them claimed to be Imperiused but actually acted of their own free will. Another Death Eater named Avery was able to avoid Azkaban this way as well.
“Avery – from what I’ve heard he wormed his way out of trouble by saying he’d been acting under the Imperius Curse – he’s still at large.”
- Harry Potter and the Goblet of Fire, Chapter 27 (Padfoot Returns)
How exactly he did this is never explicitly detailed, but we do know he was both wealthy and well-connected in the wizarding world. It seems very likely he was able to convince most people of his innocence, since he was a governor at Hogwarts.