He graduaded from the Suk School (10,112 AG) and married Wanna Marcus. Though Suk Imperial Conditioning supposedly makes the subject incapable of inflicting harm, the Baron's Twisted mentat Piter de Vries found a workaround.
The Baron has taken Yueh's wife Wanna prisoner, threatening her with torture and death unless Yueh complies with his demands. Harkonnen also distracts Leto's Mentat Thufir Hawat from discovering Yueh by guiding Hawat toward another suspect: Leto's Bene Gesserit concubine Lady Jessica Atreides. With Jessica herself eliminating suspects though her Bene Gesserit skills of observation and Truthsaying, Hawat notes that testing Yueh in this way would be an empty gesture since he's conditioned by the High College.
Jessica also notes her knowledge that Wanna was a Bene Gesserit slain by the Harkonnens, hearing his hate when speaking about them
The Atreides are soon attacked by Harkonnen forces (secretly supplemented by the seemingly unstoppable Imperial Sardaukar) as Yueh follows orders and disables the protective shields around the Atreides palace on Arrakis. Yueh stabbed the Duke with a poison dart, and while he was paralysed he replaced one of the Duke's teeth with a false one that could expel poisonous gas. The idea was that the Duke would have an opportunity to kill the Baron, using the poisoned gas tooth. Unfortunately, the plan failed, and the Duke was killed.
Yueh discovers that Wanna is indeed dead moments before DeVries kills him, and Leto's assassination attempt of the Baron only kills Leto and DeVries. Leto and Jessica's son Paul Atreides flees into the desert with Jessica, aided by survival kits left for them by Yueh. Both are presumed dead, but are of course alive and living among the planet's native Fremen.
Yueh died by the hand of de Vries, stabbed in the back by the twisted Mentat who had come to the logical conclusion that the traitor had outlived his usefulness. He died with the knowledge that his wife had in fact been dead for years, slain by the Harkonnens and kept a secret, so that he could do their bidding.