Exhibit 23.1

Consent of Independent Registered Public Accounting Firm

We consent to the incorporation by reference in the following Registration Statements:

| (1) | Registration Statement (Form S-8 No. 333-168717) pertaining to the EnerSys 2010 Equity Incentive Plan,

| (2) | Registration Statement (Form S-3 No. 333-151000) of EnerSys,

| (3) | Registration Statement (Form S-8 No. 333-143209) pertaining to the EnerSys 2006 Equity Incentive Plan, and

| (4) | Registration Statement (Form S-8 No. 333-120660) pertaining to the EnerSys Employee Stock Purchase Plan and EnerSys 2004 Equity Incentive Plan,

of our reports dated May 28, 2013, with respect to the consolidated financial statements and schedule of EnerSys and the effectiveness of internal control over financial reporting of EnerSys, included in this Annual Report (Form 10-K) of EnerSys for the year ended March 31, 2013.

/s/ Ernst & Young LLP

Philadelphia, Pennsylvania

May 28, 2013