<PAGE>


                                                                    Exhibit 10.4


                             SECURED PROMISSORY NOTE



$5,900,010
                                                                McLean, Virginia



         FOR VALUE RECEIVED, David Gladstone ("BORROWER"), Chairman of the Board
of Directors and Chief Executive Officer of Gladstone Capital Corporation, a
Maryland corporation ("COMPANY") hereby unconditionally promises to pay to the
order of Company, in lawful money of the United States of America and in
immediately available funds, the principal sum of Five Million Nine Hundred
Thousand Ten Dollars ($5,900,010) (the "LOAN") together with accrued and unpaid
interest thereon, each due and payable on the dates and in the manner set forth
below.

         It is the intent of the parties that the purpose of this Note is not
for consumer, family or household purposes.

         This Secured Promissory Note is the Note referred to in and is executed
and delivered in connection with that certain Stock Pledge Agreement dated as of
even date herewith and executed and delivered by Borrower in favor of Company
(as the same may from time to time be amended, modified or supplemented or
restated, the "PLEDGE AGREEMENT"). Additional rights of Company are set forth in
the Pledge Agreement. All capitalized terms used herein and not otherwise
defined herein shall have the respective meanings given to them in the Pledge
Agreement.


         1.   PRINCIPAL REPAYMENT. The outstanding principal amount of the Loan
shall be due and payable on August 23, 2010.

         2.   INTEREST RATE. Borrower further promises to pay interest on the
outstanding principal amount hereof from the date hereof until payment in full,
which interest shall be payable at the rate of 4.9% per annum or the maximum
rate permissible by law (which under the laws of the Commonwealth of Virginia
shall be deemed to be the laws relating to permissible rates of interest on
commercial loans), whichever is less. Interest shall be due and payable
quarterly in arrears not later than the first day of each quarter for the
preceding calendar quarter and shall be calculated on the basis of a 360 day
year and a 90 day quarter consisting of three 30 day months. The first quarterly
interest payment shall be due on January 1, 2002.

         Any principal repayment or interest payment on the Loan hereunder not
paid within five (5) days of the date when due, whether at stated maturity, by
acceleration or otherwise, shall bear interest at two percent (2%) per annum
over the rate stated above.


                                       1
<PAGE>

         3.   PLACE/MANNER OF PAYMENT. All amounts payable hereunder shall be
payable at the office of Company unless another place of payment shall be
specified in writing by Company.

         4.   APPLICATION OF PAYMENTS. Payment on this Note shall be applied
first to accrued interest, if any, and thereafter to the outstanding principal
balance hereof.

         5.  SECURED NOTE. The full amount of this Note is secured by the
collateral identified and described as security therefor in the Pledge
Agreement. Borrower shall not, directly or indirectly, create, permit or suffer
to exist, and shall defend the collateral against and take such other action as
is necessary to remove, any lien on or in the collateral, or in any portion
thereof.

         6.  DEFAULT. Each of the following events shall be an "EVENT OF
DEFAULT" hereunder:

             (a)   Borrower fails to pay timely any of the principal amount due
under this Note on the date the same becomes due and payable or any accrued
interest or other amounts due under this Note on the date the same becomes due
and payable or within five (5) business days thereafter;

             (b)   Borrower files a petition or action for relief under any
bankruptcy, insolvency or moratorium law or any other law for the relief of, or
relating to, debtors, now or hereafter in effect, or makes any assignment for
the benefit of creditors or takes any action in furtherance of any of the
foregoing;

             (c)   An involuntary petition is filed against Borrower (unless
such petition is dismissed or discharged within sixty (60) days) under any
bankruptcy statute now or hereafter in effect, or a custodian, receiver,
trustee, assignee for the benefit of creditors (or other similar official) is
appointed to take possession, custody or control of any property of Borrower;

             (d)   Borrower defaults on an obligation contained in the Pledge
Agreement; or

             (e)   That date which is sixty (60) days after Borrower's
employment by or association with Company is terminated for any reason or no
reason, including, without limitation, death of Borrower.

Upon the occurrence of an Event of Default hereunder, all unpaid principal,
accrued interest and other amounts owing hereunder shall, at the option of
Company, and, in the case of an Event of Default pursuant to (b) or (c) above,
automatically, be immediately due, payable and collectible by Company pursuant
to applicable law. Notwithstanding the foregoing, if an Event of Default has
occurred under (e) above due to, in Company's sole discretion, no malfeasance or
misfeasance on the part of Borrower, this Note shall be accelerated only after
five (5) days' notice to Borrower or any successor. Company shall have all
rights and may exercise any remedies available to it under law, successively or
concurrently. Borrower expressly acknowledges and agrees that Company shall have
the right to offset any obligations of Borrower hereunder against salaries,
bonuses or other amounts that may be payable to Borrower by Company.


                                       2
<PAGE>


         7.   WAIVER. Borrower waives presentment and demand for payment, notice
of dishonor, protest and notice of protest of this Note, and shall pay all costs
of collection when incurred, including, without limitation, reasonable
attorneys' fees, costs and other expenses. The right to plead any and all
statutes of limitations as a defense to any demands hereunder is hereby waived
to the full extent permitted by law.

         8.   GOVERNING LAW. This Note shall be governed by, and construed and
enforced in accordance with, the laws of the Commonwealth of Virginia, excluding
conflict of laws principles that would cause the application of laws of any
other jurisdiction.

         9.   SUCCESSORS AND ASSIGNS. The provisions of this Note shall inure to
the benefit of and be binding on any successor to Borrower and shall extend to
any holder hereof. Borrower shall not, without the prior written consent of
holder, assign any of its rights or obligations hereunder.


                                        BORROWER:

Dated:  August 23, 2001                 /s/ DAVID GLADSTONE
                                        ----------------------------------------
                                        David Gladstone






                                       3