<PAGE>
                                                                 EXHIBIT 4(k)(i)

                AMENDMENT NO. 2 TO $300,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 agent (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 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 amend the Credit
Agreement as hereinafter set forth.

         1. AMENDMENTS TO THE CREDIT AGREEMENT. Subject to the conditions set
forth in paragraph 2 hereof, the Credit Agreement is, effective as of the date
hereof, hereby amended as follows:

         (a) The following new terms are added to Section 1.01 in the
appropriate alphabetical positions:

                  "ALTERNATIVE CURRENCY" means Canadian Dollars, Euros, Sterling
         or Yen.

                  "CANADIAN DOLLARS" means lawful money of Canada.

                  "EURO" means the currency adopted as legal tender by the
         European Community, the European Coal and Steel Community, the European
         Atomic Energy Community and the European Monetary Union.

                  "DOLLAR EQUIVALENT" means, as to Dollars, the amount thereof,
         and as to any Alternative Currency, the Dollar equivalent of such
         Alternative Currency as determined by the Administrative Agent in
         accordance with the provisions of Section 4.07 of this Agreement.

                  "STERLING" means lawful money of the United Kingdom.

                  "YEN" means lawful money of Japan.

         (b) Section 2.04 is hereby amended by adding the phrase "Dollar
Equivalent of" before the phrase "the aggregate LC Outstandings" in the fourth
line thereof.

         (c) Section 4.02 is hereby amended in full to read as follows:

                           "(a) Each Letter of Credit shall be issued (or stated
                  maturity thereof extended or terms thereof modified or
                  amended) on not less than three (3) Business Days' prior
                  written notice thereof to the Administrative Agent (which
                  shall promptly distribute copies thereof to the Lenders) and
                  the relevant Issuing Bank and shall be denominated in Dollars
                  or in an Alternative Currency. Each such notice (a "Request
                  for Issuance") shall specify (i) the date (which shall be a
                  Business Day) of issuance of such Letter of Credit (or the




<PAGE>

                  date of effectiveness of such extension, modification or
                  amendment) and the stated expiry date thereof (which shall be
                  no later than the date that is five (5) Business Days prior to
                  the Termination Date), subject to the other terms and
                  conditions contained herein (including the satisfaction of the
                  conditions precedent set forth in Section 6.02), (ii) the
                  proposed stated amount of such Letter of Credit (which stated
                  amount shall not be less than $250,000 or the Dollar
                  Equivalent thereof in an Alternative Currency, as the case may
                  be) and whether such Letter of Credit is denominated in
                  Dollars, Canadian Dollars, Euros, Sterling or Yen and (iii)
                  such other information as shall demonstrate compliance of such
                  Letter of Credit with the requirements specified therefor in
                  this Agreement and the relevant Issuing Bank Agreement. Each
                  Request for Issuance shall be irrevocable unless modified or
                  rescinded by the Borrower not less than two (2) days prior to
                  the proposed date of issuance (or effectiveness) specified
                  therein. Not later than 12:00 noon on the proposed date of
                  issuance (or effectiveness) specified in such Request for
                  Issuance, and upon fulfillment of the applicable conditions
                  precedent and the other requirements set forth herein in the
                  relevant Issuing Bank Agreement, such Issuing Bank shall issue
                  (or extend, amend or modify) such Letter of Credit and provide
                  notice and a copy thereof to the Administrative Agent, which
                  shall promptly furnish copies thereof to the Lenders.

                           (b) Each Lender severally agrees with such Issuing
                  Bank to participate in the Extension of Credit resulting from
                  the issuance (or extension modification or amendment) of such
                  Letter of Credit, in the manner and the amount provided in
                  Section 4.04(b), and the issuance of such Letter of Credit
                  shall be deemed to be a confirmation by such Issuing Bank and
                  each Lender of such participation in such amount.

                           (c) Each Issuing Bank agrees on the terms and
                  conditions herein set forth, to issue Letters of Credit for
                  the account of the Borrower from time to time in accordance
                  with Section 4.02(a); provided, however, that at the time of
                  such issuance of any Letter of Credit, after giving effect to
                  such issuance, (i) the aggregate Dollar Equivalent of the
                  stated amount of all Letters of Credit outstanding shall not
                  exceed $250,000,000; (ii) the aggregate Dollar Equivalent of
                  the stated amount of all Letters of Credit outstanding (A) in
                  Canadian Dollars shall not exceed $35,000,000, (B) in Euros
                  shall not exceed $35,000,000, (C) in Sterling shall not exceed
                  $15,000,000 and (D) in Yen shall not exceed $15,000,000; and
                  (iii) the sum of the aggregate principal amount of the Loans
                  and the aggregate Dollar Equivalent of the LC Outstandings
                  shall not exceed the Commitments."

         (d) Clause (a) of Section 4.04 is hereby amended by deleting the phrase
"a sum equal to the amount so paid plus interest on such amount" and
substituting therefor the following: "a sum in Dollars equal to the Dollar
Equivalent of the amount so paid plus interest on such amount."

         (e) The first clause in the first sentence of clause (b) of Section
4.04 is amended to read as follows: "If any Issuing Bank shall not have been
reimbursed in full on the date of payment of a Letter of Credit for any payment
made by such Issuing Bank under the Letter of Credit issued by such Issuing Bank
on such date," and the second clause in the second sentence of clause (b) of
Section 4.04 beginning with "by paying to the Administrative Agent" is hereby
amended to read as follows: "by paying to the Administrative Agent for the
account of such Issuing Bank an amount in Dollars equal to such Lender's
Percentage of the Dollar Equivalent of such unreimbursed amount paid by such
Issuing Bank, plus interest on the Dollar Equivalent of such amount at a rate
per annum equal to the Federal Funds Effective Rate from the date of such
payment by such Issuing Bank to the date of payment to such Issuing Bank by such
Lender."



                                       2
<PAGE>

         (f) The second sentence of clause (c) of Section 4.04 is hereby amended
by adding the phrase "the Dollar Equivalent of" before the phrase "the
outstanding principal amount due and payable" in the last phrase thereof.

         (g) Clause (d) of Section 4.04 is hereby amended by deleting "Each
participation" in the first line thereof and by substituting therefor the phrase
"The Dollar Equivalent of the amount of each participation" and by adding after
"ABR Loan" the phrase "in the amount of such Dollar Equivalent".

         (h) A new Section 4.07 is hereby added after Section 4.06 to read in
full as follows:

                  "SECTION 4.07. CURRENCY EQUIVALENTS.

                  For purposes of Articles IV and V of this Agreement, the
         Dollar Equivalent of any Alternative Currency shall be determined by
         the Agent by using the quoted closing spot rate at which Barclays'
         principal office in London offers to exchange Dollars for such
         Alternative Currency in London on the day such equivalent is to be
         determined; provided, however, that if at any time of such
         determination, for any reason, no spot rate is being quoted, the
         Administrative Agent, after consultation with the Borrower, may use any
         reasonable method it deems appropriate to determine such rate, and such
         determination shall be conclusive absent manifest error. The Dollar
         Equivalent of the stated amount of each Letter of Credit outstanding
         made in an Alternative Currency and of the amount of each participation
         purchased by a Lender under Section 4.04(b) shall be recalculated
         hereunder on (i) each date that it shall be necessary to determine the
         unused portion of each Lender's Commitment, or any or all Loans,
         Letters of Credit outstanding, LC Outstandings or any Extension of
         Credit, or (ii) on any such other date on which the Agent deems such
         recalculation necessary or advisable, but in any event at least
         monthly. The Agent agrees to provide notice to the Lenders of the
         relevant Dollar Equivalent determined pursuant to each such
         determination and each such recalculation as soon as practicable
         following such determination or recalculation, as the case may be."

         (i) The third sentence of clause (a) of Section 5.01 is hereby amended
by adding before the phrase "the unpaid amount of such distribution" the
following: "the Dollar Equivalent of".

         (j) Clause (b) of Section 5.03 is hereby amended in full to read as
follows:

                  "(b) On the date of any termination or optional or mandatory
         reduction of the Commitments pursuant to Section 2.03, and on any date
         on which the sum of the aggregate principal amount of the Loans and the
         aggregate Dollar Equivalent of all LC Outstandings shall exceed the
         aggregate amount of the Commitments, the Borrower shall first, pay or
         prepay so much of the principal outstanding on the Loans or so much of
         the LC Outstandings that represent amounts that have been drawn under
         Letters of Credit but have neither been reimbursed by the Borrower nor
         converted into ABR Loans, second, if all of the Loans and all of such
         unreimbursed amounts constituting LC Outstandings shall have been paid
         in full, provide cash collateral, pursuant to the Cash Collateral
         Agreement, to secure so much of the remaining LC Outstandings, and
         third, cause so much of Letters of Credit to be cancelled (if necessary
         after taking into account the payments and provision of cash collateral
         in the immediately preceding clause), in each case, as shall be
         necessary in order that the sum of the aggregate principal amount of
         the Loans outstanding and the aggregate Dollar Equivalent of all LC
         Outstandings (in each case after giving effect to all Extensions of
         Credit to be made on such date and the application of the proceeds
         thereof) will not exceed the aggregate amount of the sum of the
         Commitments (following such termination or reduction, if any) and such
         cash collateral, together with, in the case of any such payment (x)
         accrued interest to the date of such prepayment on the amount




                                       3
<PAGE>

         repaid and (y) in the case of prepayments of Eurodollar Rate Loans and
         Swingline Loans, any amount payable to the Lenders pursuant to Section
         5.04(b). Any payments and prepayments required by clause "first" of
         this subsection (b) shall be applied to outstanding Swingline Loans up
         to the full amount thereof before they are applied, first to
         outstanding ABR Loans and second, to outstanding Eurodollar Rate loans
         and third, to unreimbursed amounts constituting LC Outstandings. In the
         event that the Borrower requests the release of any cash collateral
         pursuant to the terms of the Cash Collateral Agreement and on the date
         of such request or at any time prior to the time of such release, there
         has become, or there becomes, due and payable any prepayment of any
         Loans under this Agreement, the Borrower hereby directs the Collateral
         Agent to apply the proceeds of such release of cash collateral to such
         prepayment of such Loans and agrees that any such request is a
         confirmation of such direction."

         (k) A new Section 11.15 is hereby added after Section 11.14 to read in
full as follows:

         "SECTION 11.15.  JUDGMENT CURRENCY.

                  (a) If for the purposes of obtaining judgment in any court it
         is necessary to convert a sum due hereunder or under the Notes in any
         currency (the "ORIGINAL CURRENCY") into another currency (the "OTHER
         CURRENCY") the parties hereto agree, to the fullest extent that they
         may effectively do so, that the rate of exchange used shall be that at
         which in accordance with normal banking procedures the Administrative
         Agent could purchase the Original Currency with the Other Currency at
         Barclays on the Business Day immediately preceding that on which final
         judgment is given.

                  (b) The obligation of the Borrower in respect of any sum due
         in the Original Currency from it to any Lender, Swing Line Lender,
         Issuing Bank, Collateral Agent or Administrative Agent hereunder or
         under any other Loan Document shall, notwithstanding any judgment in
         any Other Currency, be discharged only to the extent that on the
         Business Day following receipt by such Lender, Issuing Lender, Swing
         Line Lender, Collateral Agent or Administrative Agent (as the case may
         be) of any sum adjudged to be so due in such Other Currency such
         Lender, Issuing Lender, Swing Line Lender, Collateral Agent or
         Administrative Agent (as the case may be) may in accordance with normal
         banking procedures purchase the Original Currency with such Other
         Currency; if the amount of the Original Currency so purchased is less
         than the sum originally due to such Lender, Issuing Lender, Swing Line
         Lender, Collateral Agent or Administrative Agent (as the case may be)
         in the Original Currency, the Borrower agrees, as a separate obligation
         and notwithstanding any such judgment, to indemnify such Lender,
         Issuing Lender, Swing Line Lender, Collateral Agent or Administrative
         Agent (as the case may be) against such loss, and if the amount of the
         Original Currency so purchased exceeds the sum originally due in the
         Original Currency to any Lender, Issuing Lender, Swing Line Lender,
         Collateral Agent or Administrative Agent (as the case may be), such
         Lender, Issuing Lender, Swing Line Lender, Collateral Agent or
         Administrative Agent (as the case may be) agrees to remit to the
         Borrower such excess."

         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.



                                       4
<PAGE>

                  (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 Amendment, 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 the 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 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.




                                       5

<PAGE>

                  (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]



                                        6
<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