He 'married' Katharina - but being a nun vowed to Holy Orders she was already the Bride of Christ - making it adultery. He broke his own vows of celibacy at the same time.
Just like his near-contemporary Henry VIII, Luther happened to form a set of theological beliefs that would allow him to have sexual relations with the woman he wanted.
An example of Luther's creed can be found in his letter to Melanchthon
"Be a sinner, and let your sins be strong , but let your trust in Christ be stronger, and rejoice in Christ who is the victor over sin, death, and the world."
Luther insisted that the mere fact of his baptism allowed him to sin as much as he wanted. He did not need to repent. This then was Luther's 'faith' - a dreadful presumption on God's mercy and one of the two sins against hope (the other being despair).
Anyone today who calls themselves 'saved' is in danger of committing the same presumption as Luther. We are not 'saved': we are being saved.