The Scottish Qualifications Authority (SQA) is predicting a similar deficit for 2014/15 - partly due to the rising cost of delivering controversial new school qualifications.
The financial pressures facing the SQA emerged as thousands of pupils across the country prepare to sit National 4 and National 5 exams from tomorrow.
The Nationals - which have replaced Standard Grades - will be taken by some 54,000 15 and 16-year-old pupils over the next five weeks.
Minutes of a meeting of the SQA board show the body had an overall deficit of £3m and a cash deficit of £2m in 2013/14. As a result, ministers sanctioned an additional £2m grant.
The SQA has put in place a package of support measures including extra course materials and hundreds of subject events for more than 7500 teachers.
The board papers go on to warn the quango is facing "significant ambiguity" over its budget for 2014/15 because of the costs of the implementation of the Curriculum for Excellence (CfE).
Although the new National qualifications are in place this summer, schools are likely to need ongoing support next year when new Highers are introduced.
The minutes stated: "It was noted that this uncertainty was likely to continue to some degree for the next three to five years until CfE was fully implemented."
If future additional support from the Scottish Government is not forthcoming, the board has warned of potential "adverse operational consequences impacting on the safe delivery of CfE". However, there is no suggestion that is a likelihood.
Alan McKenzie, acting general secretary of the Scottish Secondary Teachers Association, said the deficit highlighted a lack of preparation on the part of both the SQA and the Scottish Government.
He said: "No government organisation should be operating in deficit mode and the SQA should have been able to predict its expenditure in a better way than this.
"We have concerns that the scale of the extra demand placed on resources because of the roll-out of CfE was not anticipated."
Larry Flanagan, general secretary of the Educational Institute of Scotland teaching union, said: "If the SQA is going to deliver for schools it needs to be funded properly. The SQA can manage a £3m deficit, but we would not be happy if the cost of qualifications to schools increased to cover future deficits because that would take money out of council education budgets."
Ken Cunningham, general secretary of School Leaders Scotland, which represents secondary headteachers, urged ministers to keep a close eye on future CfE running costs. He said: "These are uncertain times because the overall costs of the roll-out of CfE are not yet known. If the SQA IS in deficit now, we need to ensure the government is ready to provide additional support if and when required."
Eileen Prier, executive director of the Scottish Parent Teacher Council, said "The cost of the SQA's pursuit of excessive and unrealistic levels of assessment have been costly in many ways - for young people, teachers and the SQA itself. It now seems likely the taxpayer will also carry a cost."
A Scottish Government spokesman said: "The position with the SQA was closely monitored and managed throughout the year and a balanced position was achieved at year end."
The SQA, which had operational costs of £67.7m in 2012-13, said the delivery of this year's exam diet was on track and the deficit was forecast at the start of the last financial year.