A former manager who defrauded Macquarie Bank of $1.2 million has avoided prison.

Michael Roth was sentenced to two years in jail for two fraud offences in the New South Wales District court on Friday.

He will serve the sentence in the community under strict supervision under an intensive correction order.

The court heard Roth, 45, took the money from the company's leasing arm over almost a decade to fund an alcohol and gambling addiction.

Judge Julia Baly said Roth had not committed any offences before the frauds and had sought treatment for his bipolar disorder and, as a result, had good prospects of rehabilitation.

During the sentencing the court heard Roth started drinking and gambling at lunch times early in his career at the bank.

Judge Baly summarised a submission from one of Roth's counsellors.

"He got caught up with a senior manager who would drink and gamble at lunch time and the behaviour was allowed to continue because they were making the company so much money, " she said.

"A pattern emerged whereby the offender would work in the mornings then drink and gamble with other Macquarie Bank staff.

"There were times when he would stay awake all night and gamble."

The court also heard reports from Roth's wife, via reports from his counsellor, that after looking back she realised her husband had been through manic periods and thought it was from the adrenalin of his industry.

"She put it down to the hedonistic Macquarie lifestyle ... always drinking and socialising with clients," Judge Baly said.

The court heard at one point during the investigation into the crimes Roth disappeared to Darwin and slept on the streets and that he had a history of bipolar disorder in his family.

Judge Baly said while she was not convinced by Roth's defence at first, she accepted his crimes came about because he was consumed by his drinking and gambling addictions.

The court heard Roth was now working and studying and had expressed a desire to try to repay some of the money.