Impact
(1949)

Walter Williams (Brian Donlevy) is a wealthy man who is deeply in love with his wife, Irene (Helen Walker).  Irene is having an affair with Jim.  Irene and Jim have plotted to kill Walter. Jim hitches a ride with Walter, pretending to be Irene's cousin. Jim hits Walter with a tire iron, and takes off in Walter's car.  Jim dies in a fiery crash. Due to the fire damage to the corpse, the police identify it as Walter.  Walter survives, and hitches a ride in the back of a moving van to a distant town.

The police find some clues and investigate Irene for plotting to kill her husband.  Walter learns from the newspapers that his wife is charged with his murder.  He decides to stay holed up in a small town, so she will be punished for his "murder". Walter takes a job working for Marsha. Walter and Marsha fall in love. He tells her the truth of his background. Marsha convinces Walter that it is wrong to let Irene get convicted of murder, while he is alive.  He goes back home.

When Walter returns, in a completely nonsensical twist, the police charge him with murdering Jim. In the trial, Walter's lawyer proves that Irene and Jim had plotted to murder Walter. The prosecutor drops charges against Walter and announces charges against Irene for conspiracy to commit murder. Walter is given his old job back. Marsha agrees to stay in the city with him.

Thanks Joseph C!