Exhibit 23.1

CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

We hereby consent to the incorporation by reference in the Registration Statements on Form S-8 (No. 333-229435) of Hercules Capital, Inc. of our report dated February 20, 2020 relating to the financial statements, financial statement schedule, and the effectiveness of internal control over financial reporting, which appears in this Form 10-K.

/s/ PricewaterhouseCoopers LLP

San Francisco, California

February 20, 2020