Fastow, Enron's former chief financial officer, had pleaded guilty in 2004 to two counts of conspiracy over the Enron scandal and agreed to give evidence against his former bosses.
The judge, who could have given Fastow up to 10 years, said Fastow's co-operation, desire to help victims suing to recover their losses and his visible remorse led to him imposing the lesser sentence.
Enron, once the seventh largest US company, collapsed in December 2001 after it spent years hiding billions of debts through false accounting or making failing ventures appear profitable.
The collapse wiped out more than $60 billion in market value and led to the loss of thousands of jobs, along with more than two billion dollars worth of pension plans.
Fastow's lawyers had asked for a lesser sentence, citing his help in the US government's successful prosecution of Kenneth Lay, founder of Enron, and Jeffrey Skilling, the former chief executive, for conspiracy and fraud.
Fastow's evidence proved crucial in the convictions of Skilling, due to be sentenced next month, and Lay, who died in July of heart disease.
Lay's lawyers are currently working to erase his convictions.
At their trial, Fastow testified that Lay and Skilling were aware of fraudulent financial structures engineered by Fastow and his staff.