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-188070) pertaining to the Equity Incentive Plan of Hannon Armstrong Sustainable Infrastructure Capital, Inc. of (i) our report dated March 17, 2014, with respect to the consolidated financial statements for Hannon Armstrong Sustainable Infrastructure Capital, Inc. and (ii) our report dated January 25, 2013, with respect to the financial statements of HA EnergySource Holdings LLC included in this Annual Report (Form 10-K) for the year ended December 31, 2013.

/s/ Ernst & Young LLP

McLean, Virginia

March 17, 2014