Exhibit 23.1

CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

We consent to the incorporation by reference in Registration Statement No. 333-269722 on Form S-8 of our report dated June 8, 2023, relating to the consolidated financial statements of Nextracker Inc. appearing in this Annual Report on Form 10-K for the year ended March 31, 2023.

/s/ DELOITTE & TOUCHE LLP

San Jose, California

June 8, 2023