As a result, it has been forced to seek further funding from the US Treasury, submitting a request to borrow $10.7 billion by the end of September.
However, the result is an improvement on that recorded during the same period in 2008, when the firm made a loss of $23.2 billion.
Fannie Mae said in a statement that its performance had been partially affected by the recession and rising unemployment in the US.
"Second-quarter results were driven primarily by $18.8 billion of credit-related expenses, reflecting the ongoing impact of adverse conditions in the housing market," it added.
Following the announcement, shares in the mortgage provider dropped by over 12 per cent in after-hours trading on Wall Street, falling to 69c.
Fannie Mae, along with rival Freddie Mac, recently received joint assistance from the US Treasury and the Federal Reserve.