<PAGE>
                                                                         4(j)(i)

                AMENDMENT NO. 2 TO $450,000,000 CREDIT AGREEMENT


         This AMENDMENT NO. 2, dated as of November 26, 2001, among CMS Energy
Corporation (the "BORROWER"), the lenders parties thereto as "lenders" (the
"LENDERS"), Barclays Bank PLC, as administrative gent (the "ADMINISTRATIVE
AGENT"), collateral agent (the "COLLATERAL AGENT") and issuing bank (the
"ISSUING BANK"), Bank of America, N.A., and The Chase Manhattan Bank, as
co-syndication agents (the "CO-SYNDICATION AGENTS"), and Citibank, N.A., and
Union Bank of California, as documentation agents (the "DOCUMENTATION AGENTS").

         PRELIMINARY STATEMENTS:

         (1) The Borrower, the Lenders, the Administrative Agent, the Collateral
Agent, the Co-Syndication Agents and the Documentation Agents have entered into
a $450,000,000 Credit Agreement, dated as of June 18, 2001 (as amended, the
"CREDIT AGREEMENT"; the terms defined therein being used herein as therein
defined unless otherwise defined herein).

         (2) The parties to the Credit Agreement have agreed to terminate the
Letter of Credit facility and, consequently, to amend the Credit Agreement as
hereinafter set forth.

         1. AMENDMENTS TO THE CREDIT AGREEMENT. Subject to the conditions set
forth in paragraph 2 hereof, clause (c) of Section 4.02 of the Credit Agreement
is, effective as of the date hereof, hereby amended by deleting the reference to
"$100,000,000" therein and substituting "0" therefor.

         2. CONDITIONS TO EFFECTIVENESS. The amendments contemplated by this
Agreement shall become effective upon the execution and delivery of counterparts
hereof by the Required Lenders, the Administrative Agent, the Collateral Agent,
the Issuing Bank and the Borrower and the fulfillment of the following
conditions:

                  (a) All representations and warranties contained in this
         Agreement and in the Credit Agreement and the other Loan Documents, in
         each case as amended hereby, shall be true and correct in all material
         respects.

                  (b) No event shall have occurred and be continuing which
         constitutes a Default or an Event of Default.

         3. REFERENCE TO AND EFFECT ON THE LOAN DOCUMENTS. On and after the
effective date of this Agreement, each reference in the Credit Agreement to
"this Agreement", "hereunder", "hereof" or words of like import referring to the
Credit Agreement shall mean and be a reference to the Credit Agreement, as
amended by this Agreement, and each reference in the other Loan Documents to
"the Credit Agreement", "thereunder", "thereof" or words of like import
referring to the Credit Agreement shall mean and be a reference to the Credit
Agreement, as amended by this Agreement. Except as specifically amended above,
the Credit Agreement and all other Loan Documents are and shall continue to be
in full force and effect and are hereby in all respects ratified and confirmed.
Without limiting the generality of the foregoing, the Cash Collateral Agreement
and all of the Collateral described therein do and shall continue to secure the
payment of all obligations of Borrower described therein after giving effect to
this Agreement.

         4. MISCELLANEOUS.

                  (a) The Borrower reaffirms and restates the representations
         and warranties set forth in the Credit Agreement and the other Loan
         Documents, and all such representations and



<PAGE>

         warranties shall be true and correct on the date hereof with the same
         force and effect as if made on such date. The Borrower represents and
         warrants (which representations and warranties shall survive the
         execution and delivery hereof) that:

                           (i) It is a duly organized, validly existing
                  corporation in good standing under the laws of its
                  organization and has the corporate power and authority to
                  execute, deliver and carry out the terms and provisions of
                  this Agreement and has taken or caused to be taken all
                  necessary corporate action to authorize the execution,
                  delivery and performance of this Agreement;

                           (ii) No consent of any other person, including,
                  without limitation, shareholders or creditors of the Borrower,
                  and no action of, or filing with any governmental or public
                  body or authority, is required to authorize, or is otherwise
                  required in connection with the execution, delivery and
                  performance of this Agreement;

                           (iii) This Agreement has been duly executed and
                  delivered by a duly authorized officer on behalf of the
                  Borrower, and constitutes its legal, valid and binding
                  obligations, enforceable in accordance with its terms, except
                  as enforcement thereof may be subject to the effect of any
                  applicable (i) bankruptcy, insolvency, reorganization,
                  moratorium or similar law affecting creditors' rights
                  generally and (ii) general principles of equity (regardless of
                  whether enforcement is sought in a proceeding in equity or at
                  law); and

                           (iv) The execution, delivery and performance of this
                  Agreement will not violate any law, statue or regulation
                  applicable to the Borrower or any order or decree of any court
                  or governmental instrumentality applicable to it, or conflict
                  with, or result in the breach of, or constitute a default
                  under, any of its contractual obligations.

                  (b) Nothing herein contained shall constitute a waiver or be
         deemed to be a waiver, of any existing Defaults or Events of Default,
         and the Lenders and the Agent reserve all rights and remedies granted
         to them by the Credit Agreement, the other Loan Documents, by law and
         otherwise.

                  (c) This Agreement may be executed in any number of separate
         counterparts, each of which shall collectively and separately
         constitute one agreement.

                  (d) This Agreement shall be governed by, and construed in
         accordance with, the laws of the State of New York.

                            [signature pages follow]




                                       2
<PAGE>





         IN WITNESS WHEREOF, the parties hereto have caused this Agreement to be
executed by their respective officers thereunto duly authorized, as of the date
first above written.


                        CMS ENERGY CORPORATION



                        By: /s/ Alan M. Wright
                           ----------------------------------------
                           Name: Alan M Wright
                           Title: Executive Vice President, Chief Financial
                                  Officer and Chief Administrative Officer


                        BARCLAYS BANK PLC, individually as a Lender and as
                        Administrative Agent, Collateral Agent and Issuing Bank

                        By: /s/ Sydney G. Dennis
                            ------------------------
                        Name: Sydney G. Dennis
                        Title:  Director


                                       5