EXHIBIT 23.1

CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

We consent to the incorporation by reference in the Registration Statement (Form S-8 No. 333-141827) pertaining to the Triangle Capital Corporation 2007 Equity Incentive Plan, as amended, of our reports dated March 7, 2012, with respect to the consolidated financial statements and financial highlights and the effectiveness of internal control over financial reporting of Triangle Capital Corporation, included in the Annual Report (Form 10-K) for the year ended December 31, 2011.

 

/s/ Ernst & Young LLP

Raleigh, North Carolina

March 7, 2012