Exhibit 23.1
CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM
We consent to the incorporation by reference in this Registration Statement on Form S-8 of our
reports dated December 20, 2010, relating to the consolidated financial statements and financial
statement schedule of Quanex Building Products Corporation (the “Company”) (which expresses
an unqualified opinion and includes an explanatory paragraph regarding the separation of the
Company’s vehicular products and building products businesses), and the effectiveness of the
Company’s internal control over financial reporting, appearing in the Annual Report on Form 10-K of
the Company for the year ended October 31, 2010.
/s/ DELOITTE & TOUCHE LLP
Houston, Texas
April 1, 2011