Mike Sidwell, 42, died immediately after being shot twice, with one bullet striking Sidwell in the head, about 8:20 p.m., Lindon Police Chief Cody Cullimore said.
Sidwell attempted to stop Lee from entering the townhouse, about 166 N. 400 West, which he shared for about five years with his wife, Lee's ex.
Police said when Lee discovered his ex-wife was not in the home, he looked next door first, by shooting open the front door to a vacant townhouse with his 12-gauge shotgun, and then, by shooting down the door of another home, where a couple in their 60s lives.
"He terrorized them for a minute and searched their house, believing his ex-wife was hiding in there, but he didn't harm them," Cullimore said. "It all happened very quickly."
When police arrived about 8:25 p.m., the chief said, Lee laid down his weapons and gave himself up.
Lee, who lives about a mile away from his ex-wife's new home, was booked into Utah County Jail on Thursday on suspicion of homicide, two counts of aggravated burglary and two counts of aggravated assault.
No formal charges were filed against Lee as of Friday afternoon. An investigation is ongoing.