Exhibit 23.1

Consent of Independent Registered Public Accounting Firm

We consent to the reference to our firm under the caption “Experts” and to the use of our report dated March 5, 2026, included in the Proxy Statement of NextCure, Inc. that is made a part of the Registration Statement (Form S-4) and Prospectus of NextCure, Inc. for the registration of shares of its common stock.

/s/ Ernst & Young LLP

Baltimore, Maryland

August 18, 2026