<PAGE>   1
                                                                  EXHIBIT 10.17


                               FIRST AMENDMENT TO
                          SUBORDINATED LOAN AGREEMENT
                              AND PROMISSORY NOTE


                  THIS FIRST AMENDMENT TO SUBORDINATED LOAN AGREEMENT AND
PROMISSORY NOTE (this "First Amendment") dated effective as of October 27, 1999
is entered into by and between HOUSTON EXPLORATION COMPANY, a Delaware
corporation (the "Company"), and KEYSPAN CORPORATION d/b/a KeySpan Energy (as
successor to MarketSpan Corporation d/b/a KeySpan Energy) (the "Lender").

                             PRELIMINARY STATEMENT

                  The Lender and the Company are parties to that certain
Subordinated Loan Agreement dated as of November 30, 1998 (as same may be
further amended, restated and extended herein, the "Credit Agreement") under
and subject to the terms of which the Lender has committed to make Advances
through January 1, 2000, not to exceed $150,000,000.00 in aggregate amount
outstanding, and that certain Promissory Note dated November 30, 1998 executed
by the Company to the order of Lender (the "Note").

                  The Company and the Lender desire to amend the Credit
Agreement for the sole purpose of extending the maturity date.

                  NOW THEREFORE, in consideration of the premises and the
mutual agreements, representations and warranties herein set forth and for
other good and valuable consideration, the Company and the Lender hereby agree
as follows:

                  SECTION 1. Definitions. Unless otherwise defined in this
First Amendment, each capitalized term used in this First Amendment has the
meaning assigned to such term in the Credit Agreement.

                  SECTION 2. Amendments to the Credit Agreement. (a) The Credit
Agreement and the Note are hereby amended such that all references to "Maturity
Date" or "Termination Date," and all references to "January 1, 2000" within the
definitions of Maturity Date and Termination Date, whether in the Credit
Agreement, the schedules thereto or in the Note, shall mean and be a reference
to the date of March 31, 2000.

                  (b) Specifically, the section of the Credit Agreement on page
one thereof entitled "Maturity Date" and the identical provision under the same
title on page one of Schedule I to the

<PAGE>   2
Credit agreement are hereby amended by deleting same in their entirety and
replacing same with the following:

          Maturity Date:   All outstanding principal, unpaid accrued
                           interest and fees will be repaid at Maturity,
                           March 31, 2000. Any principal amount that remains
                           outstanding subsequent to the Maturity Date will be
                           converted into equity (the number of shares to be
                           issued to the Lender will be determined based upon
                           the average of the closing prices of Houston
                           Exploration's common stock, rounded to three decimal
                           places, as reported under "NYSE Composite
                           Transaction Reports" in the Wall Street Journal
                           during the 20 consecutive trading days ending three
                           trading days prior to March 31, 2000. Because the
                           market value represents an average of the Company's
                           common stock over twenty consecutive trading days
                           ending three trading days prior to Maturity, the
                           market price may be higher or lower than the price
                           of the common stock on the conversion date. The total
                           amount converted to equity shall not exceed the Total
                           Commitment Amount. Any unpaid accrued interest or
                           fees that remain outstanding subsequent to the
                           Maturity Date will be paid in cash. Notwithstanding
                           the foregoing, upon any sale, transfer or other
                           disposition of the stock or substantially all of the
                           assets of the Company prior to March 31, 2000,
                           all outstanding principal and unpaid accrued
                           interest and fees will be paid in cash on the
                           consummation of such sale, transfer or other
                           disposition.

                  (c) The Credit Agreement is hereby amended to reflect the
fact that, as consideration for the extension of the Maturity Date as evidenced
by, and as a condition to the effectiveness of, this First Amendment, the
Company shall pay to the Lender an up-front fee of Twelve Thousand and No/100
Dollars ($12,000.00).

                  SECTION 3. Ratification. The agreements and obligations of
the Company under the Credit Agreement, the Note and any and all other Loan
Documents, are hereby brought forward, renewed and extended until the
indebtedness evidenced by the Credit Agreement and the Note shall have been
fully paid and discharged. The Credit Agreement and the Note, and all terms
thereof shall remain in full force and effect. The Lender hereby preserves all
of its rights against the Company, and the Company hereby agrees that all such
rights are ratified and brought forward for the benefit of the Lender.

                  SECTION 4. Representations True; No Default. The Company and
the Lender represent and warrant that this First Amendment has been duly
authorized, executed and delivered on behalf of the Company and the Lender,
respectively, and the Credit Agreement, as amended hereby, constitutes the
valid and legally binding agreement of the Company and the Lender, enforceable
in accordance with its terms, except as enforceability thereof may be limited
by bankruptcy, insolvency, reorganization or moratorium or other similar law
relating to creditors' rights and by general equitable principles which may
limit the right to obtain equitable remedies (regardless of whether such
enforceability is considered in a proceeding, in equity or at law);

                                      -2-

<PAGE>   3

                  SECTION 5. No Obligation. This First Amendment shall not
create a course of dealing among or between the parties hereto, and no further
obligation of any kind in excess of those expressly set forth herein shall be
inferred from this First Amendment.

                  SECTION 6. Conditions of Effectiveness. This First Amendment
shall become effective on the date upon which this First Amendment shall have
been duly executed and delivered by the Company and the Lender, together with a
certificate of the Company certifying as to (i) the incumbency of the officer
executing this First Amendment, (ii) the truth of the representations and
warranties in the Credit Agreement, and (iii) the absence of any defaults under
the Credit Agreement.

                  SECTION 7. Reference to the Agreement. (a) Upon the
effectiveness of this First Amendment, each reference in the Credit Agreement
to "hereunder," "herein," "hereof" or words of like import shall mean and be a
reference to the Agreement, as affected and amended hereby.

                  (b) Upon effectiveness of this First Amendment, each
reference in the Credit Agreement shall mean and be a reference to the Credit
Agreement, as affected and amended hereby.

                  SECTION 8. Miscellaneous Provisions. (a) This First Amendment
may be signed in any number of counterparts, each of which shall be deemed an
original, but all of which together shall constitute one and the same
instrument.

                  (b)   The headings herein shall be accorded no significance
in interpreting this First Amendment.

                  SECTION 9. Governing Law. This First Amendment shall be
governed by and construed in accordance with the laws of the State of New York
and applicable federal law.

                  SECTION 10. FINAL AGREEMENT OF THE PARTIES. THIS FIRST
AMENDMENT, THE CREDIT AGREEMENT, THE NOTES AND THE OTHER LOAN DOCUMENTS
CONSTITUTE A "LOAN AGREEMENT" AS DEFINED IN SECTION 26.02(A) OF THE TEXAS
BUSINESS AND COMMERCE CODE AND REPRESENT THE FINAL AGREEMENT BETWEEN THE
PARTIES AND MAY NOT BE CONTRADICTED BY EVIDENCE OF PRIOR, CONTEMPORANEOUS OR
SUBSEQUENT AGREEMENTS OF THE PARTIES.

               THERE ARE NO ORAL AGREEMENTS BETWEEN THE PARTIES.


                            [SIGNATURE PAGES FOLLOW]


                                      -3-

<PAGE>   4


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


                                       KEYSPAN CORPORATION,
                                          D/B/A KEYSPAN ENERGY


                                              By: /s/ Robert R. Wieczorek
                                                  -----------------------
                                              Name: Robert R. Wieczorek
                                              Title: VP, Secretary and Treasurer
                                              Address: One MetroTech Center
                                              Brooklyn, NY 11201


                                       THE HOUSTON EXPLORATION COMPANY


                                       By:  /s/ Thomas W. Powers
                                            --------------------
                                            Thomas W. Powers
                                            Senior Vice President
                                            1100 Louisiana, Suite 2000
                                            Houston, Texas 77002


                                      -4-