QuickLinks -- Click here to rapidly navigate through this document

Exhibit 10.40

FIRST AMENDMENT TO
QUANEX CORPORATION HOURLY BARGAINING UNIT SAVINGS PLAN

        THIS AGREEMENT, by Quanex Corporation (the "Sponsor"),

WITNESSETH:

        WHEREAS, the Sponsor maintains Quanex Corporation Hourly Bargaining Unit
Savings Plan (the "Plan") and its related trust (the "Trust");

        WHEREAS, the Sponsor retained the right to amend the Plan from time to
time; and

        WHEREAS, the Sponsor amended and restated the Plan effective as of
January 1, 1998; and

        WHEREAS, the Board of Directors of the Sponsor previously approved
resolutions authorizing any amendments to the Plan as may be required by the
Internal Revenue Service in order to make the Plan and Trust effective and to
obtain a favorable determination letter that the Plan is a qualified plan under
section 401(a) of the Internal Revenue Code of 1986, as amended (the "Code") and
the Trust is exempt from federal income taxes under section 501(a) of the Code;
and

        WHEREAS, the Internal Revenue Service is requiring certain amendments
prior to approval of the Plan;

        NOW, THEREFORE, effective December 12, 1994, the Sponsor agrees that the
Plan is hereby amended as follows:

        Section 13.7 of the Plan is hereby completely amended and restated to
provide as set forth in the substitute pages attached hereto which shall be
inserted into the Plan in place of the above-described original section.

        IN WITNESS WHEREOF, the Sponsor has executed this Agreement this 30th
day of October, 2002.

    QUANEX CORPORATION
 
 
By:
/s/  PAUL J. GIDDENS      

--------------------------------------------------------------------------------

    Title: Vice President Human Resources and Administration

--------------------------------------------------------------------------------

13.04   Requirements Upon Merger or Consolidation of Plans.    The Plan shall
not merge or consolidate with or transfer any assets or liabilities to any other
plan unless each Participant and former Participant would receive a benefit
immediately after the merger, consolidation, or transfer which is equal to or
greater than the benefit he would have been entitled to receive immediately
before the merger, consolidation, or transfer (if the Plan had then terminated).
13.05
 
Gender of Words Used.    If the context requires it, words of one gender when
used in the Plan shall include the other gender, and words used in the singular
or plural shall include the other.
13.06
 
Severability.    Each provision of this Agreement may be severed. If any
provision is determined to be invalid or unenforceable, that determination shall
not affect the validity or enforceability of any other provision.
13.07
 
Reemployed Veterans.    Effective December 12, 1994, the requirements of the
Uniformed Services Employment and Reemployment Rights Act of 1994 will be
complied with in the operation of the Plan in the manner permitted under
section 414(u) of the Code.
13.08
 
Limitations on Legal Actions.    No person may bring an action pertaining to the
Plan or Trust until he has exhausted his administrative claims and appeal
remedies identified in Section 5.12. Further, no person may bring an action
pertaining to a claim for benefits under the Plan or the Trust following
180 days after the committee's final denial of his claim for benefits.
13.09
 
Governing Law.    The provisions of the Plan shall be construed, administered,
and governed under the laws of the United States unless the specific matter in
question is governed by state law in which event the laws of the State of Texas
shall apply.

--------------------------------------------------------------------------------

QuickLinks

Exhibit 10.40

FIRST AMENDMENT TO QUANEX CORPORATION HOURLY BARGAINING UNIT SAVINGS PLAN