<PAGE>   1
                                                                   EXHIBIT 10.51

                                SECOND AMENDMENT

         THIS SECOND AMENDMENT (this "Amendment"), dated as of February 13,
2001, to the Credit Agreement referenced below, is by and among RailWorks
Corporation, a Delaware corporation (the "Borrower"), the Subsidiaries of the
Borrower identified on the signature pages hereto (the "Guarantors"), the
Lenders identified on the signature pages hereto and Bank of America, N.A., as
Administrative Agent. Terms used herein but not otherwise defined herein shall
have the meanings provided to such terms in the Credit Agreement.

                               W I T N E S S E T H

         WHEREAS, a $250 million credit facility has been extended to the
Borrower pursuant to the terms of that Amended and Restated Credit Agreement
dated as of April 28, 2000 (as amended, modified and supplemented from time to
time, the "Credit Agreement") among the Borrower, the Guarantors, the Lenders,
First Union National Bank, as Documentation Agent, and Bank of America, N.A., as
Administrative Agent;

         WHEREAS, the Borrower has requested certain modifications to the Credit
Agreement;

         WHEREAS, the requested modifications require the consent of the
Required Lenders; and

         WHEREAS, the Required Lenders have agreed to the requested
modifications on the terms and conditions set forth herein.

         NOW, THEREFORE, IN CONSIDERATION of the premises and other good and
valuable consideration, the receipt and sufficiency of which are hereby
acknowledged, the parties hereto agree as follows:

         1.       Amendments. The Credit Agreement is amended in the following
         respects:

         1.1      The following definitions in Section 1.1 of the Credit
         Agreement are amended to read as follows:

                           "Consolidated Senior Leverage Ratio" means, as of the
                           last day of any fiscal quarter, the ratio of (x)
                           Consolidated Senior Debt on such day less any
                           earn-out payments owing under seller financing
                           obligations to (y) Consolidated EBITDA for the period
                           of four consecutive fiscal quarters ending as of such
                           day.

                           "Consolidated Total Leverage Ratio" means, as of the
                           last day of any fiscal quarter, the ratio of (x)
                           Consolidated Total Funded Debt on such day less any
                           earn-out payments owing under seller financing
                           obligations to (y) to Consolidated EBITDA for the
                           period of four consecutive fiscal quarters ending as
                           of such day.

         1.2      The first sentence of Section 3.3(c)(ii)(A) is amended to read
         as follows:

                           Mandatory prepayments made under this Section 3.3 in
                           respect of Divestitures shall be applied ratably
                           among the Tranche B Term Loan (to the principal
                           amortization installments thereof in inverse order of


                                       53
<PAGE>   2

                           maturity) and the Revolving Obligations (with a
                           corresponding permanent reduction in the Aggregate
                           Revolving Committed Amount and the Available
                           Revolving Committed Amount in each case in an amount
                           equal to all amounts applied to the Revolving
                           Obligations pursuant to this Section 3.3(c)(ii)(A)).

         1.3      Clauses (b) and (c) of Section 3.4 of the Credit Agreement is
         renumbered as clauses (c) and (d) thereof, respectively, and a new
         clause (b) is added to Section 3.4 of the Credit Agreement to read as
         follows:

                           (b)      Mandatory Reductions. The Aggregate
                           Revolving Committed Amount and the Available
                           Revolving Committed Amount automatically shall be
                           permanently reduced by the amount of any prepayment
                           on the Revolving Obligations pursuant to Section
                           3.3(c)(ii)(A).

         1.4      Clause (a) of Section 7.9 of the Credit Agreement is amended
         to read as follows:

                           (a)      Consolidated Total Leverage Ratio. As of the
                           end of each fiscal quarter of the members of the
                           Consolidated Group, the Consolidated Total Leverage
                           Ratio shall not be greater than the ratio set forth
                           below:

<TABLE>
<CAPTION>
                                            Fiscal Quarter End                  Ratio
                                            ------------------                  -----
                                            <S>                                 <C>
                                            December 31, 2000                   5.75:1.0
                                            March 31, 2001                      5.90:1.0
                                            June 30, 2001                       5.90:1.0
                                            September 30, 2001                  5.10:1.0
                                            December 31, 2001                   4.50:1.0
                                            March 31, 2002                      4.25:1.0
                                            June 30, 2002                       4.25:1.0
                                            September 30, 2002                  4.25:1.0
                                            December 31, 2002 and thereafter    4.00:1.0
</TABLE>

         1.5      Clause (b) of Section 7.9 of the Credit Agreement is amended
         to read as follows:

                           (b)      Consolidated Senior Leverage Ratio. As of
                           the end of each fiscal quarter of the members of the
                           Consolidated Group, the Consolidated Senior Leverage
                           Ratio shall not be greater than the ratio set forth
                           below:

<TABLE>
<CAPTION>
                                            Fiscal Quarter End                  Ratio
                                            ------------------                  -----
                                            <S>                                 <C>
                                            December 31, 2000                   3.00:1.0
                                            March 31, 2001                      3.10:1.0
                                            June 30, 2001                       3.10:1.0
                                            September 30, 2001                  2.75:1.0
                                            December 31, 2001 and thereafter    2.50:1.0
</TABLE>

         1.6      Clause (c) of Section 7.9 of the Credit Agreement is amended
         to read as follows:

                           (c)      As of the end of each fiscal quarter of the
                           members of the Consolidated Group, Consolidated Net
                           Worth shall be not less than the sum of (i) $82
                           million plus (ii) on the last day of each fiscal
                           quarter to end after December 31, 2000, seventy-five
                           percent (75%) of


                                       54
<PAGE>   3

                           Consolidated Net Income for the fiscal quarter (but
                           not less than zero), such increases to be cumulative,
                           plus (iii) one hundred percent (100%) of any
                           increases in Consolidated Net Worth resulting from
                           Equity Transactions occurring after the date of the
                           First Amendment.

         2.       FCM Rail Sale. It is acknowledged and agreed that (i)
notwithstanding that the sale by the Borrower of the capital stock of FCM Rail,
Ltd. (the "FCM Rail Sale") shall have been consummated prior to the
effectiveness of this Amendment, the parties hereto agree that the FCM Rail Sale
shall be subject to Section 3.3(c)(ii)(A) of the Credit Agreement and Section
3.4(b) of the Credit Agreement as each such section is amended by this Amendment
(i.e., the Aggregate Revolving Committed Amount and the Available Revolving
Committed Amount shall both be permanently reduced by an amount equal to all
amounts applied to the Revolving Obligations in connection with the FCM Rail
Sale), and (ii) from the date of the FCM Rail Sale, the financial covenants in
Section 7.9(a) [including, without limitation, calculation of the Consolidated
Total Leverage Ratio for the purpose of the definition of "Application
Percentage" set forth in Section 1.1 and calculation of all such financial
covenants for the purposes of Sections 8.1, 8.3 and 8.4] shall be made on a Pro
Forma Basis giving effect to the Divestiture thereof, as provided in Section
1.3.

         3.       Conditions Precedent. This Amendment shall be effective upon
satisfaction of the following conditions precedent:

                  (a)      receipt by the Administrative Agent of multiple
                  counterparts of this Amendment executed by the Credit Parties
                  and the Required Lenders; and

                  (b)      the sale of FCM Rail, Ltd. shall have been
                  consummated.

         4.       Representations. The Borrower hereby affirms that the
representations and warranties set forth in the Credit Agreement and the other
Credit Documents are true and correct as of the date hereof (except those which
expressly relate to an earlier period).

         5.       Release. Each Credit Party hereby represents and warrants that
it has no claims, counterclaims, offsets, or defenses to the Credit Documents or
to the performance of its obligations thereunder. In consideration of the
Lenders' willingness to enter into this Amendment, each Credit Party hereby
releases the Administrative Agent, the Collateral Agent, the Lenders, and the
Administrative Agent's, the Collateral Agent's and the Lenders' respective
officers, employees, representatives, agents, counsel, trustees and directors
from any and all actions, causes of action, claims, demands, damages and
liabilities or whatever kind or nature, in law or in equity, now known or
unknown, suspected or unsuspected, that may exist in connection with any of the
Credit Documents or the Obligations, to the extent that any of the foregoing
arises from any action or failure to act on or prior to the date hereof.

         6.       Reaffirmation of Guaranty. Each Guarantor (i) acknowledges and
consents to all of the terms and conditions of this Amendment, (ii) affirms all
of its obligations under the Credit Documents and (iii) agrees that this
Amendment and all documents executed in connection herewith do not operate to
reduce or discharge such Guarantor's obligations under the Credit Agreement or
the other Credit Documents.

         7.       No Other Changes. Except as modified hereby, all of the terms
and provisions of the Credit Agreement and the other Credit Documents (including
schedules and exhibits thereto) shall remain in full force and effect.

         8.       Costs and Expenses. The Borrower agrees to pay all reasonable
costs and expenses of the Administrative Agent in connection with the
preparation, execution and delivery of this Amendment, including, without
limitation, the reasonable fees and expenses of Moore & Van Allen, PLLC.


                                       55
<PAGE>   4

         9.       Counterparts. This Amendment may be executed in any number of
counterparts, each of which when so executed and delivered shall be deemed an
original and it shall not be necessary in making proof of this Amendment to
produce or account for more than one such counterpart.

         10.      Governing Law. This Amendment shall be deemed to be a contract
made under, and for all purposes shall be construed in accordance with, the laws
of the State of New York.

                  [Remainder of Page Intentionally Left Blank]


                                       56
<PAGE>   5

         IN WITNESS WHEREOF, each of the parties hereto has caused a counterpart
of this Amendment to be duly executed and delivered as of the date first above
written.

BORROWER:         RAILWORKS CORPORATION,
                  a Delaware corporation

                  By:
                     -----------------------------------------
                  Name:    Michael R. Azarela
                  Title:   President

GUARANTORS:       ALPHA-KEYSTONE ENGINEERING, INC., a Pennsylvania corporation
                  BIRMINGHAM WOOD, INC., an Alabama corporation
                  BREAKING TECHNOLOGY CORP., a New York corporation
                  BREAKING TECHNOLOGY & EQUIPMENT, INC., a New York corporation
                  COMSTOCK HOLDINGS, INC., a Delaware corporation
                  COMTRAK CONSTRUCTION, INC., a Georgia corporation
                  CONDON BROTHERS, INC., a Washington corporation
                  CPI CONCRETE PRODUCTS, INCORPORATED, a Tennessee corporation
                  EARL CAMPBELL CONSTRUCTION COMPANY, INC., a Texas corporation
                  FCM RAIL, LTD., a Michigan corporation
                  GANTREX CORPORATION, a Pennsylvania corporation
                  H.P. MCGINLEY, INC., a Pennsylvania corporation
                  HSQ TECHNOLOGY, a California corporation
                  KENNEDY RAILROAD BUILDERS, INC., a Pennsylvania corporation
                  L.K. COMSTOCK & COMPANY, INC., a New York corporation
                  M-TRACK ENTERPRISES, INC., a New York corporation
                  MCCORD TREATED WOOD, INC., an Alabama corporation
                  MERIT RAILROAD CONTRACTORS, INC., a Missouri corporation
                  MIDWEST CONSTRUCTION SERVICES, INC., an Indiana corporation
                  MIDWEST RAILROAD CONSTRUCTION AND MAINTENANCE
                           CORPORATION OF WYOMING, a Wyoming corporation
                  MINNESOTA RAILROAD SERVICE, INC., a Tennessee corporation
                  NEOSHO ASIA, INC., a Kansas corporation
                  NEOSHO CENTRAL AMERICA, INC., a Kansas corporation
                  NEOSHO CONSTRUCTION COMPANY, INCORPORATED,
                           a Kansas corporation
                  NEOSHO CONTRACTORS, INC., a Wyoming corporation
                  NEOSHO INCORPORATED, INC., a Kansas corporation
                  NEOSHO INTERNATIONAL, INC., a Kansas corporation
                  NEW ENGLAND RAILROAD CONSTRUCTION CO.,
                           a Connecticut corporation
                  NORTHERN RAIL SERVICE AND SUPPLY COMPANY, INC.,
                           a Michigan corporation

                  By:
                     -----------------------------------------
                  Name:    Michael R. Azarela
                  Title:   Executive Vice President of each of the foregoing

                           [SIGNATURE PAGES CONTINUE]


                                       57
<PAGE>   6

                  RAILCORP, INC., an Ohio corporation
                  RAILWORKS RAIL PRODUCTS & SERVICES, INC., a Kansas corporation
                  RAILWORKS TRACK SYSTEMS, INC., a Nevada corporation
                  RAILWORKS TRANSIT, INC., a New York corporation
                  RAILWORKS WOOD PRODUCTS, INC., a Delaware corporation
                  RWKS CONSTRUCTION, INC., a Maryland corporation
                  SOUTHERN INDIANA WOOD PRESERVING CO., INC.,
                           an Indiana corporation
                  U.S. RAILWAY SUPPLY, INC., an Indiana corporation
                  U.S. TRACKWORKS, INC., a Michigan corporation
                  V&R ELECTRICAL CONTRACTORS, INC., a New York corporation
                  WM. A. SMITH CONSTRUCTION CO., INC., a Texas corporation
                  WOOD WASTE ENERGY, INC., a Virginia corporation
                  W.T. BYLER CO., INC., a Texas corporation

                  By:
                     -----------------------------------------
                  Name:    Michael R. Azarela
                  Title:   Executive Vice President of each of the foregoing

                  RAILWORKS TRANSIT SYSTEMS, INC., a Delaware corporation
                  RAILWORKS CANADA, INC., a Delaware corporation

                  By:
                     -----------------------------------------
                  Name:    John P. Nuzzo
                  Title:   Assistant Secretary of each of the foregoing

                  By:
                     -----------------------------------------
                  Name:    Michael R. Azarela
                  Title:   Executive Vice President of each of the foregoing

                  DURA-WOOD LLC, a Delaware limited liability company

                  By:      MCCORD TREATED WOOD, INC.,
                           an Alabama corporation, its managing member

                           By:
                              -----------------------------------------
                           Name:   Michael R. Azarela
                           Title:  Executive Vice President

                  RAILWORKS TRACK SERVICES, INC., an Indiana corporation

                  By:
                     -----------------------------------------
                  Name:    Harold Kropp
                  Title:   Vice President

                           [SIGNATURE PAGES CONTINUE]


                                       58
<PAGE>   7

LENDERS:          BANK OF AMERICA, N.A.,
                  individually in its capacity as a
                  Lender and in its capacity as Administrative Agent

                  By:__________________________
                  Name:
                  Title:

                  FIRST UNION NATIONAL BANK

                  By:__________________________
                  Name:
                  Title:

                  SUMMIT BANK

                  By:__________________________
                  Name:
                  Title:

                  M&T BANK

                  By:__________________________
                  Name:
                  Title:

                  KEY BANK NATIONAL ASSOCIATION

                  By:__________________________
                  Name:
                  Title:

                  BANK ONE, MICHIGAN

                  By:__________________________
                  Name:
                  Title:

                  COMERICA BANK

                  By:__________________________
                  Name:
                  Title:

                           [SIGNATURE PAGES CONTINUE]


                                       59
<PAGE>   8

                  STATE STREET BANK AND TRUST COMPANY,
                  as Trustee for GENERAL MOTORS WELFARE BENEFITS TRUST

                  By:__________________________
                  Name:
                  Title:

                  STATE STREET BANK AND TRUST COMPANY, as Trustee for
                  GENERAL MOTORS EMPLOYEES GLOBAL GROUP PENSION TRUST

                  By:__________________________
                  Name:
                  Title:

                  ALLFIRST BANK

                  By:__________________________
                  Name:
                  Title:

                  HELLER FINANCIAL, INC.

                  By:__________________________
                  Name:
                  Title:

                  THE PROVIDENT BANK

                  By:__________________________
                  Name:
                  Title:

                  FOOTHILL INCOME TRUST II, L.P.

                  By:__________________________
                  Name:
                  Title:

                  METROPOLITAN PROPERTY AND CASUALTY INSURANCE COMPANY

                  By:__________________________
                  Name:
                  Title:

                           [SIGNATURE PAGES CONTINUE]


                                       60
<PAGE>   9

                  FLOATING RATE PORTFOLIO
                  By:      INVESCO Senior Secured Management, Inc.,
                  as attorney in fact

                  By:
                     -----------------------------------------
                  Name:
                  Title:

                  AVALON CAPITAL LTD.
                  By:      INVESCO Senior Secured Management, Inc.

                  By:
                     -----------------------------------------
                  Name:
                  Title:

                  CERES II FINANCE LTD
                  By:      INVESCO Senior Secured Management, Inc.,
                           as Sub-Management Agent (Financial)

                  By:
                     -----------------------------------------
                  Name:
                  Title:

                  VAN KAMPEN PRIME RATE INCOME TRUST

                  By:
                     -----------------------------------------
                  Name:
                  Title:

                  VAN KAMPEN CLO I, LIMITED

                  By:
                     -----------------------------------------
                  Name:
                  Title:

                  VAN KAMPEN SENIOR INCOME TRUST

                  By:
                     -----------------------------------------
                  Name:
                  Title:

                  J.H. WHITNEY MARKET VALUE FUND, L.P.

                  By:
                     -----------------------------------------
                  Name:
                  Title:


                                       61