Meaning
To toe the line / To behave properly
Example
Depois que meu marido me perdoou da traição, preciso andar na linha.
After my husband forgave me for cheating, I need to walk the line.
Origin
The most-cited interpretation is military: soldiers marching in formation must stay in a straight line or face punishment. A parallel English expression 'toe the line' is usually traced to British Parliamentary procedure (members kept their toes behind a floor line during debates).
Source: Phrases.org.uk — toe the line.
Practice idioms with the Idiom Trainer
Falando's Idiom Trainer teaches you to recognize idiom meanings and create sentences using them, so you can speak like a Brazilian.
More idioms
Acertar na moscaTo guess correctly / To hit the nail on the headAmigo da onçaA fake/false friendArmar um barracoTo cause a public sceneRodar a baianaTo cause a public scene / To go ballisticArrumar sarna pra se coçarTo ask for troubleArrastar as asasTo hit on someone / To flirtAbrir o jogoTo come clean / To open upArregaçar as mangasTo roll up one's sleeves / To get to workAgarrar com unhas e dentesTo hold on for dear life / To seize an opportunityBater as botasTo kick the bucket / To die