Matthew Hagen was a treasure hunter who made his living stealing goods and presumably fencing them. Gotham mob boss Boss Xylas hired him to drop off a sack of stolen diamonds offshore, on the bottom of a buoy. Hagen, however, planned to double cross them, and alongside his lady friend Lisa, were attacked by Xylas' goons. Hagen dove into the Gotham bay and surfaced inside a small underwater cave. Inside the cave was a small pool of special clay that Hagen fell into. The clay changed him into a being of living clay, capable of transforming into various shapes and retaining their powers.
After Xylas' goons kidnapped Lisa, Hagen attacked them and killed them. Batman had arrived to foil the crime, only to be traumatized by the fact that he couldn't stop the monster from killing, even though they were crooks. Hagen took Lisa to a cemetery where he revealed himself to her. He took the name Clayface here, referring to his face. The name had previously been used by a past Batman villain, but he was as of yet unconnected. Lisa and Hagen hid out in an abandoned pumping station whilst Hagen continued stealing treasures. After about two days, he reverted to human form. Seeking the powers he had had while he was Clayface, he returned to the pool and dipped in it again.
Both Batman and Xylas eventually caught up to Hagen with Batman adopting the Matches Malone persona to seek information on him. Before they did, however, Hagen stopped Lisa from leaving him by smothering her in himself. Xylas was killed by Hagen either crushing his head or blowing himself up with a grenade - it was unclear which happened first. Batman was able to overcome him using phosphorus bombs and knockout gas.
Hagen continued antagonizing Batman for years to come. He was eventually able to perfect a synthetic version of the protoplasm. However, it allowed him to stay in form for five hours as opposed to two days. Hagen was ultimately killed during the waning days of the Crisis on Infinite Earths, by Shadow Demons.
Following his death, the original Clayface returned. One that showed up before he died and one that showed up after organized a memorial for him and posthumously inducted him to their team, called the Mud Pack. They try futilely to resurrect him.
It is later revealed Matt Hagen survived the Shadow Demon attack and has not been as prominent a villian. He makes an appaearance during The Infinite Crisis when he tries to capture Power Girl for Alexander Luthor Jr.
Batman: The Animated Series
The Clayface in Batman: The Animated Series was named Matt Hagen, although his story was also somewhat similar to Basil Karlo. Hagen reluctantly worked for Roland Daggett because Daggett had concocted a drug called ReNuYu which could restore any cellular scarring, which Hagen needed after an accident. After Hagen failed to complete a job, Daggett cut off Hagen, knowing he would return for more of his formula.
When Hagen arrived, Daggett ordered him killed and they overdosed him with the formula. This turned Hagen into Clayface, who swore revenge.