Lot was a just and righteous man.
And delivered just Lot, vexed with the filthy conversation of the wicked: (For that righteous man dwelling among them, in seeing and hearing, vexed his righteous soul from day to day with their unlawful deeds;) 2 Peter 2:7-8
He was the only man that God saved from the cities of Sodom and Gomorrah.
...the angels hastened Lot, saying, Arise, take thy wife, and thy two daughters, which are here; lest thou be consumed in the iniquity of the city. Genesis 19:15
He got drunk and impregnated his virgin daughters.
Come, let us make our father drink wine, and we will lie with him, that we may preserve seed of our father. And they made their father drink wine that night: and the firstborn went in, and lay with her father; and he perceived not when she lay down, nor when she arose. Behold, I lay yesternight with my father: let us make him drink wine this night also; and go thou in, and lie with him, that we may preserve seed of our father. And they made their father drink wine that night also: and the younger arose, and lay with him; and he perceived not when she lay down, nor when she arose. Thus were both the daughters of Lot with child by their father. Genesis 19:32-36
Yet elsewhere incest is condemned.
None of you shall approach to any that is near of kin to him, to uncover their nakedness. Leviticus 18:6
And, at least in some cases, is punishable by death.
And the man that lieth with his father's wife hath uncovered his father's nakedness: both of them shall surely be put to death; their blood shall be upon them. Leviticus 20:11
And if a man lie with his daughter in law, both of them shall surely be put to death: they have wrought confusion; their blood shall be upon them. Leviticus 20:12
And if a man take a wife and her mother, it is wickedness: they shall be burnt with fire, both he and they; that there be no wickedness among you. -- Leviticus 20:14