The phrase uses 'straight and narrow' as a metaphor for a direct and honest life course. After his release from jail, he promised to stay on the straight and narrow.
Pro Tip 2/3
Behavioral Change
It often implies a positive change in someone's behavior or choices. He used to be quite the troublemaker, but he's been on the straight and narrow for years now.
Pro Tip 3/3
Figurative Use
The phrase doesn't mean a person is literally walking straight, but acting in a morally correct way. Despite peer pressure, she chose the straight and narrow.