<PAGE>   1
                                                                    EXHIBIT 10.4


                          REGISTRATION RIGHTS AGREEMENT

     THIS REGISTRATION RIGHTS AGREEMENT (this "Agreement") is made as of July
12, 2001, by and among Akorn, Inc., a Louisiana corporation (the "Company") and
The John N. Kapoor Trust Dated September 20, 1989 (the "Investor").

     Pursuant to a Convertible Bridge Loan and Warrant Purchase Agreement of
even date herewith (the "Loan Agreement"), by and among the Company and the
Investor, the Investor will loan the Company the aggregate principal amount of
$5,000,000, in two tranches, which amount is convertible into Common Stock, and
receive Warrants to purchase Common Stock. In order to induce the Investor to
enter into the Loan Agreement and acquire the Notes and the Warrants, the
Company has agreed to provide the registration rights set forth in this
Agreement. The execution and delivery of this Agreement is a condition to the
Closing under the Loan Agreement. Unless otherwise provided in this Agreement,
capitalized terms used herein shall have the meanings set forth in paragraph 9
hereof.

     The parties hereto agree as follows:

     1. Demand Registrations.

        (a) Requests for Registration. At any time following the ninetieth
(90th) day after the date of the Closing under the Loan Agreement, the holders
of at least fifty-one percent (51%) of the Registrable Securities may request
registration under the Securities Act of all or part of their Registrable
Securities ("Demand Registration") on Form S-1 or any similar long-form
registration ("Long-Form Registration") or, if available, the holders of at
least fifty-one percent (51%) of the Registrable Securities may request a Demand
Registration on Form S-2 or S-3 or any similar short-form registration
("Short-Form Registration"). Each request for a Demand Registration shall
specify the approximate number of Registrable Securities requested to be
registered which must, for a Long-Form Registration, include at least
fifty-percent (50%) of the Registrable Securities. Within ten (10) days after
receipt of any request for a Demand Registration, the Company will give written
notice of such requested registration to all other holders of Registrable
Securities and, subject to paragraph 1(d) below, will include in such
registration all Registrable Securities with respect to which the Company has
received written requests for inclusion therein within fifteen (15) days after
the receipt of the Company's notice.

        (b) Long-Form Registrations. The holders of the Registrable Securities
will be entitled to request one (1) Long-Form Registration; provided that a
registration will not count as the permitted Long-Form Registration unless the
holders of Registrable Securities are able to register and sell seventy-five
percent (75%) of the Registrable Securities requested to be included in such
registration; and provided further that in any event the Company will pay all
Registration Expenses in connection with any registration initiated as a
Long-Form Registration whether or not it becomes effective.

        (c) Short-Form Registrations. In addition to the Long-Form Registration
provided pursuant to paragraph 1(b), the holders of the Registrable Securities
will be entitled to request two (2) Short-Form Registrations annually in which
the Company will pay all


<PAGE>   2

Registration Expenses. Demand Registrations will be Short-Form Registrations
whenever the Company is permitted to use any applicable short form.

        (d) Priority on Demand Registrations. The Company will not include in
any Demand Registration any securities which are not Registrable Securities
without the prior written consent of the holders of a majority of the
Registrable Securities included in such registration, which consent will not be
unreasonably withheld. If a Demand Registration is an underwritten offering and
the managing underwriters advise the Company in writing (with a copy to each
holder of Registrable Securities requesting registration) that in their opinion
the number of Registrable Securities and, if permitted hereunder, other
securities requested to be included in such offering exceeds the number of
Registrable Securities and other securities, if any, which can be sold therein
without adversely affecting the marketability of the offering, the Company will
include in such registration, prior to the inclusion of any securities which are
not Registrable Securities, the number of Registrable Securities requested to be
included which in the opinion of such underwriters can be sold without adversely
affecting the marketability of the offering, pro rata among the respective
holders of Registrable Securities on the basis of the number of shares of
Registrable Securities that each holder of Registrable Securities has requested
to be included in such registration. Any Persons other than holders of
Registrable Securities who participate in Demand Registrations which are not at
the Company's expense must pay their share of the Registration Expenses as
provided in paragraph 5 hereof.

        (e) Selection of Underwriters. The holders of a majority of the
Registrable Securities will have the right to select the investment banker(s)
and managing underwriter(s) to administer an offering initiated as a Demand
Registration, subject to the Company's approval which shall not be unreasonably
withheld.

        (f) Restrictions on Long-Form Registrations. The Company shall not be
obligated to effect any Long-Form Registration within one hundred eighty (180)
days after the effective date of any previous registration of securities by the
Company or a previous registration in which the holders of Registrable
Securities were given piggyback rights pursuant to paragraph 2 and in which
there was no reduction in the number of Registrable Securities to be included.

        (g) Other Registration Rights. The Company will not grant to any Person
(as defined in the Loan Agreement) the right to request the Company to register
any equity securities of the Company, or any securities convertible or
exchangeable into or exercisable for such securities, which would be superior to
or otherwise interfere with the Investor's registration rights hereunder without
the prior written approval of the holders of at least fifty-one percent (51%) of
the Registrable Securities, which consent shall not be unreasonably withheld.
Except for registration rights provided to Dr. John N. Kapoor, trusts
established by or on his behalf, or his spouse or immediate family members, the
Company represents and warrants to the Investor that no Person has the right to
register any equity securities of the Company which are superior to or would
otherwise interfere with the Investor's registration rights hereunder.



                                     - 2 -
<PAGE>   3

     2. Piggyback Registrations.

        (a) Right to Piggyback. Whenever the Company proposes to register any of
its securities under the Securities Act (other than pursuant to a Demand
Registration or a registration on Form S-4 or Form S-8 or any successor or
similar forms ) and the registration form to be used may be used for the
registration of Registrable Securities (a "Piggyback Registration"), whether or
not for sale for its own account, the Company will give prompt written notice to
all holders of Registrable Securities of its intention to effect such a
registration and, subject to paragraphs 2(c) and 2(d), will include in such
registration all Registrable Securities with respect to which the Company has
received written requests for inclusion therein within fifteen (15) days after
the receipt of the Company's notice.

        (b) Piggyback Expenses. The Registration Expenses of the holders of
Registrable Securities will be paid by the Company in all Piggyback
Registrations, whether or not consummated.

        (c) Priority on Primary Registrations. If a Piggyback Registration is an
underwritten primary registration on behalf of the Company, and the managing
underwriters advise the Company in writing (with a copy to each holder of
Registrable Securities requesting registration of Registrable Securities) that
in their opinion the number of securities requested to be included in such
registration exceeds the number which can be sold in such offering without
adversely affecting the marketability of such offering, the Company will include
in such registration, (i) first, the securities the Company proposes to sell,
and (ii) second, the Registrable Securities requested to be included in such
registration, pro rata among the holders thereof on the basis of the number of
shares that each holder has requested to be included in such registration.

        (d) Priority on Secondary Registrations. If a Piggyback Registration is
an underwritten secondary registration on behalf of the Company or on behalf of
holders of the Company's securities other than holders of Registrable
Securities, and the managing underwriters advise the Company in writing (with a
copy to each holder of Registrable Securities requesting registration of
Registrable Securities) that in their opinion the number of securities requested
to be included in such registration exceeds the number which can be sold in such
offering without adversely affecting the marketability of the offering, the
Company will include in such registration (i) first, the securities requested to
be included therein by the holders requesting such registration and the
Registrable Securities requested to be included in such registration, pro rata
among the holders on the basis of the number of shares that each holder has
requested to be included in such registration, and (ii) second, other securities
requested to be included in such registration, pro rata among the holders of
such securities.

        (e) General Priority Rule. Notwithstanding anything contained in this
Agreement to the contrary, no holder of shares of any class of capital stock of
the Company shall be entitled to have their shares included in any Piggyback
Registration if such inclusion shall reduce the number of shares includable by
holders of Registrable Securities in such registration, except with the prior
written consent of the holders of at least fifty-one percent (51%) of the
Registrable Securities, which consent will not be unreasonably withheld.


                                     - 3 -
<PAGE>   4

        (f) Other Registrations. If the Company has previously filed an
underwritten registration statement with respect to Registrable Securities
pursuant to paragraph 1 or pursuant to this paragraph 2, and if such previous
registration has not been withdrawn or abandoned, the Company will not file or
cause to be effected any other registration of any of its equity securities or
securities convertible or exchangeable into or exercisable for its equity
securities under the Securities Act (except on Form S-4 or Form S-8 or any
successor form), whether on its own behalf or at the request of any holder or
holders of such securities, until a period of at least three (3) months has
elapsed from the effective date of such previous registration without the prior
written consent of the holders of at least fifty-one percent (51%) of the
Registrable Securities, which consent will not be unreasonably withheld.

     3. Holdback Agreements.

        (a) Each holder of Registrable Securities agrees not to effect any
public sale or distribution of equity securities of the Company, or any
securities, options or rights convertible into or exchangeable or exercisable
for such securities, during the seven (7) days prior to and the 90-day period
beginning on the effective date of any underwritten Demand Registration or any
underwritten Piggyback Registration (except as part of such underwritten
registration), unless the underwriters managing the Public Offering otherwise
agree.

        (b) The Company agrees (i) not to effect any public sale or distribution
of its equity securities, or any securities convertible into or exchangeable or
exercisable for such securities, during the seven (7) days prior to and during
the 120-day period beginning on the effective date of any underwritten Demand
Registration or any underwritten Piggyback Registration (except as part of such
underwritten registration or pursuant to registrations on Form S-4 or Form S-8
or any successor form), unless the underwriters managing the registered Public
Offering otherwise agree, and (ii) to use its reasonable best efforts to cause
each holder of at least five percent (5%) (on a fully diluted basis) of its
Common Stock, or any securities convertible into or exchangeable or exercisable
for Common Stock, purchased from the Company at any time after the date of this
Agreement (other than in a registered Public Offering) to agree not to effect
any public sale or distribution (including sales pursuant to Rule 144 under the
Securities Act) of any such securities during such period (except as part of
such underwritten registration, if otherwise permitted), unless the underwriters
managing the Public Offering otherwise agree.

        (c) Material Development Condition. With respect to any registration
statement filed or to be filed pursuant to a Demand Registration or a Piggyback
Registration, if the Company determines that, in its good faith judgment, it
would (because of the existence of any acquisition or corporate reorganization
or other transaction, financing activity or other development involving the
Company) be materially detrimental (a "Material Development Condition") to the
Company for such a registration statement to be filed, to become effective or to
be maintained effective or for sales of Registrable Securities to continue
pursuant to the registration statement, the Company shall be entitled, upon the
giving of a written notice that a Material Development Condition has occurred (a
"Delay Notice") from an officer of the Company to any holder included or to be
included in such registration statement, (i) to cause sales of Registrable
Securities by such Holder pursuant to such registration statement to cease, (ii)
to cause such registration statement to be withdrawn and the effectiveness of
such



                                     - 4 -
<PAGE>   5

registration statement terminated, or (iii) in the event no such registration
statement has yet been filed or declared effective, to delay filing or
effectiveness of any such registration statement until, in the good faith
judgment of the Company, such Material Development Condition no longer exists
(notice of which the Company shall promptly deliver to any holder of Registrable
Securities with respect to which any such registration statement has been
filed). Notwithstanding the foregoing provisions of this paragraph: (1) the
Company agrees to make all necessary disclosure of the existence or occurrence
of the circumstances giving rise to a Material Development Condition as promptly
as is practicable and to use its best efforts to minimize the duration of such
cessation or delay, which period shall in no event exceed one hundred (100)
consecutive days from the sending of its Delay Notice to a Holder or Holders
with respect to such Material Development Condition; (2) in the event a
registration statement is filed and subsequently withdrawn by reason of any
existing or anticipated Material Development Condition as hereinbefore provided,
the Company shall cause a new registration statement covering the same
Registrable Securities as those covered by the original registration statement
to be filed with the SEC as soon as practicable after such Material Development
Condition expires or, if sooner, not later than the expiration of such one
hundred (100) day period expires, and to use its best efforts to cause such new
registration statement to be declared effective as soon as practicable, and the
Registration Period for such new registration statement shall be the greater of
thirty (30) days or the number of days that remained in such Registration Period
with respect to the withdrawn registration statement at the time it was
withdrawn; (3) any such registration subject to a Delay Notice shall not count
as a Demand Registration hereunder for purposes of the limitation on Demand
Registrations in paragraphs 1(b) and 1(c) above; (4) in the event the Company
elects not to withdraw or terminate the effectiveness of any such registration
statement but to cause a holder or holders to refrain from selling Registrable
Securities for any period during the Registration Period, the Registration
Period with respect to such holders and such Registrable Securities shall be
extended by the number of days during the Registration Period that such holders
are required to refrain from selling Registrable Securities; and (5) the Company
may only send or impose one (1) Delay Notice during any period of twelve (12)
consecutive months.

     4. Registration Procedures.

        (a) Whenever the holders of Registrable Securities have requested that
any Registrable Securities be registered pursuant to this Agreement, the Company
will use its best efforts to effect the registration and the sale of such
Registrable Securities in accordance with the intended method of disposition
thereof, and pursuant thereto the Company will as expeditiously as possible:

            (i) prepare and file with the Securities and Exchange Commission a
     registration statement with respect to such Registrable Securities and
     thereafter use its best efforts and take all necessary action to cause such
     registration statement to become effective within thirty (30) days of
     filing or as soon thereafter (provided that before filing a registration
     statement or prospectus or any amendments or supplements thereto, the
     Company will furnish to the counsel selected by the holders of a majority
     of the Registrable Securities covered by such registration statement copies
     of all such documents proposed to be filed, which documents will be subject
     to the review and approval of such counsel) and the Company will not file
     any registration statement or



                                     - 5 -
<PAGE>   6

     amendment thereto or any prospectus or any supplement thereto, including
     documents incorporated by reference, to which the holders of a majority of
     Registrable Securities covered by such registration statement shall
     reasonably object;

            (ii) prepare and file with the Securities and Exchange Commission
     such amendments and supplements to such registration statement and the
     prospectus used in connection therewith as may be necessary to keep such
     registration statement effective for a period of either (A) not less than
     six months (subject to extension pursuant to paragraph 7(b) below) or, if
     such registration statement relates to an underwritten offering, such
     longer period as in the opinion of counsel for the underwriters a
     prospectus is required by law to be delivered in connection with sales of
     Registrable Securities by an underwriter or dealer or (B) such shorter
     period as will terminate when all of the securities covered by such
     registration statement have been disposed of in accordance with the
     intended methods of disposition by the seller or sellers thereof set forth
     in such registration statement (but in any event not before the expiration
     of any longer period required under the Securities Act), and to comply with
     the provisions of the Securities Act with respect to the disposition of all
     securities covered by such registration statement until such time as all of
     such securities have been disposed of in accordance with the intended
     methods of disposition by the seller or sellers thereof set forth in the
     registration statement;

            (iii) furnish to each seller of Registrable Securities such number
     of copies of such registration statement, each amendment and supplement
     thereto, the prospectus included in such registration statement (including
     each preliminary prospectus) and such other documents as such seller may
     reasonably request in order to facilitate the disposition of the
     Registrable Securities owned by such seller;

            (iv) use its best efforts to register or qualify such Registrable
     Securities under such other securities or blue sky laws of such
     jurisdictions as any seller reasonably requests and do any and all other
     acts and things which may be reasonably necessary or advisable to enable
     such seller of Registrable Securities to consummate the disposition in such
     jurisdictions of the Registrable Securities owned by such seller (provided,
     that the Company will not be required to (A) qualify generally to do
     business in any jurisdiction where it would not otherwise be required to
     qualify but for this subparagraph, (B) subject itself to taxation in any
     such jurisdiction, or (C) consent to general service of process in any such
     jurisdiction);

            (v) notify each seller of such Registrable Securities, at any time
     when a prospectus relating thereto is required to be delivered under the
     Securities Act, upon discovery that, or upon the discovery of the happening
     of any event as a result of which, the prospectus included in such
     registration statement contains an untrue statement of a material fact or
     omits any fact necessary to make the statements therein not misleading in
     the light of the circumstances under which they were made, and, at the
     request of any such seller, the Company will prepare and furnish to such
     seller a reasonable number of copies of a supplement or amendment to such
     prospectus so that, as thereafter delivered to the purchasers of such
     Registrable Securities, such prospectus will not contain an untrue
     statement of a material fact or omit to state any fact necessary to make
     the



                                     - 6 -
<PAGE>   7

     statements therein not misleading in the light of the circumstances under
     which they were made;

            (vi) cause all such Registrable Securities to be listed on each
     securities exchange on which similar securities issued by the Company are
     then listed and, if not so listed, to be listed on a national securities
     exchange or over-the-counter market such as the NASD automated quotation
     system and, if listed on the NASD automated quotation system, use all
     reasonable efforts to secure designation of all such Registrable Securities
     covered by such registration statement as a NASDAQ "national market system
     security" within the meaning of Rule 11Aa2-1 of the Securities and Exchange
     Commission or, failing that, to secure NASDAQ authorization for such
     Registrable Securities and, without limiting the generality of the
     foregoing, to arrange for at least two market makers to register as such
     with respect to such Registrable Securities with the NASD;

            (vii) provide a transfer agent and registrar for all such
     Registrable Securities not later than the effective date of such
     registration statement;

            (viii) enter into such customary agreements (including underwriting
     agreements in customary form which include an indemnification by the
     Company of any underwriters in customary form) and take all such other
     actions as the holders of a majority of the Registrable Securities being
     sold or the underwriters, if any, reasonably request in order to expedite
     or facilitate the disposition of such Registrable Securities (including,
     without limitation, effecting a stock split or a combination of shares);

            (ix) make available for inspection by any seller of Registrable
     Securities, any underwriter participating in any disposition pursuant to
     such registration statement any attorney, accountant or other agent
     retained by any such seller or underwriter, all financial and other
     records, pertinent corporate documents and properties of the Company, and
     use all reasonable efforts to cause the Company's officers, directors,
     employees and independent accountants to supply all information reasonably
     requested by any such seller, underwriter, attorney, accountant or agent in
     connection with such registration statement;

            (x) otherwise use all reasonable efforts to comply with all
     applicable rules and regulations of the Securities and Exchange Commission,
     and make available to its security holders, as soon as reasonably
     practicable, an earnings statement covering the period of at least twelve
     (12) months beginning with the first day of the Company's first full
     calendar quarter after the effective date of the registration statement,
     which earnings statement shall satisfy the provisions of Section 11(a) of
     the Securities Act and Rule 158 thereunder;

            (xi) permit any holder of Registrable Securities which holder, in
     its sole and exclusive judgment, might be deemed to be an underwriter or a
     controlling person of the Company, to participate in the preparation of
     such registration or comparable statement and to require the insertion
     therein of material, furnished to the Company in writing, which in the
     reasonable judgment of such holder and its counsel



                                     - 7 -
<PAGE>   8

     should be included; provided such holder shall provide the Company with
     customary indemnification regarding any such written material provided by
     the holder;

            (xii) in the event of the issuance of any stop order suspending the
     effectiveness of a registration statement, or of any order suspending or
     preventing the use of any related prospectus or suspending the
     qualification of any Common Stock included in such registration statement
     for sale in any jurisdiction, the Company will use its reasonable best
     efforts promptly to obtain the withdrawal of such order;

            (xiii) obtain a comfort letter, dated the effective date of such
     registration statement (and, if such registration includes an underwritten
     Public Offering, dated the date of the closing under the underwriting
     agreement), signed by the Company's independent public accountants in
     customary form and covering such matters of the type customarily covered by
     comfort letters as the holders of a majority of the Registrable Securities
     being sold reasonably request; and

            (xiv) provide a legal opinion of the Company's counsel addressed to
     each holder of Registrable Securities included in such registration, dated
     the effective date of such registration statement (and, if such
     registration includes an underwritten Public Offering, dated the date of
     the closing under the underwriting agreement), with respect to the
     registration statement, each amendment and supplement thereto, the
     prospectus included therein (including the preliminary prospectus) and such
     other documents relating thereto in customary form and covering such
     matters of the type customarily covered by legal opinions of such nature,
     including a comment of such counsel stating that nothing has come to their
     attention which leads them to believe that the registration statement or
     prospectus contains an untrue statement of a material fact or omits to
     state a fact necessary to make such statements not misleading.

     5. Registration Expenses.

        (a) All expenses incident to the Company's performance of or compliance
with this Agreement, including, without limitation, all registration and filing
fees, fees and expenses of compliance with securities or blue sky laws, printing
expenses, messenger and delivery expenses, and fees and disbursements of counsel
for the Company and all independent certified public accountants, underwriters
(excluding underwriting discounts and commissions) and other Persons retained by
the Company (all such expenses being herein called "Registration Expenses"),
will be borne by the Company.

        (b) In connection with each Demand Registration and each Piggyback
Registration, the Company will reimburse the holders of Registrable Securities
covered by such registration for the reasonable fees and disbursements of one
(1) counsel chosen by the holders of a majority of the Registrable Securities.

        (c) To the extent Registration Expenses are not required to be paid by
the Company, each holder of securities included in any registration hereunder
will pay those Registration Expenses allocable to the registration of such
holder's securities so included, and



                                     - 8 -
<PAGE>   9

any Registration Expenses not so allocable will be borne by all sellers of
securities included in such registration in proportion to the aggregate selling
price of the securities to be so registered.

     6. Indemnification.

        (a) The Company agrees to indemnify and hold harmless, to the extent
permitted by law, each holder of Registrable Securities, its executors, personal
representatives, successors, assigns, officers and directors and each Person who
controls such holder (within the meaning of the Securities Act) against any and
all losses, claims, damages, liabilities, joint or several, to which such holder
or any such director or officer or controlling person may become subject under
the Securities Act or otherwise, insofar as such losses, claims, damages or
liabilities (or actions or proceedings, whether commenced or threatened, in
respect thereof) arise out of or are based upon (i) any untrue or alleged untrue
statement of material fact contained in any registration statement, prospectus
or preliminary prospectus or any amendment thereof or supplement thereto, or
(ii) any omission or alleged omission of a material fact required to be stated
therein or necessary to make the statements therein not misleading, and the
Company will reimburse such holder and each such director, officer and
controlling person for any legal or any other expenses incurred by them in
connection with investigating or defending any such loss, claim, liability,
action or proceeding; provided, however, that the Company shall not be liable in
any such case to the extent that any such loss, claim, damage, liability (or
action or proceeding in respect thereof) or expense arises out of or is directly
based upon an untrue statement or alleged untrue statement, or omission or
alleged omission, made in such registration statement, any such prospectus or
preliminary prospectus or any amendment or supplement thereto, in reliance upon,
and in conformity with, written information prepared and furnished to the
Company by such holder expressly for use therein or by such holder's failure to
deliver a copy of the prospectus or any amendments or supplements thereto after
the Company has furnished such holder with a sufficient number of copies of the
same. In connection with an underwritten offering, the Company will indemnify
such underwriters, their officers and directors and each Person who controls
such underwriters (within the meaning of the Securities Act) to the same extent
as provided above with respect to the indemnification of the holders of
Registrable Securities.

        (b) In connection with any registration statement in which a holder of
Registrable Securities is participating, each such holder will furnish to the
Company in writing such information and affidavits as the Company reasonably
requests for use in connection with any such registration statement or
prospectus and, to the extent permitted by law, will indemnify and hold harmless
the Company, its directors and officers and each other Person who controls the
Company (within the meaning of the Securities Act) against any losses, claims,
damages or liabilities, to which the Company or any such director or officer or
controlling person may become subject under the Securities Act or otherwise, to
the extent that such losses, claims, damages or liabilities (or actions or
proceedings, whether commenced or threatened, in respect thereof) result from
(i) any untrue or alleged untrue statement of material fact contained in the
registration statement, prospectus or preliminary prospectus or any amendment
thereof or supplement thereto, or (ii) any omission or alleged omission of a
material fact required to be stated therein or necessary to make the statements
therein not misleading, but only to the extent that such untrue statement or
omission is made in such registration statement, any such prospectus or
preliminary prospectus or any amendment or supplement thereto, or in any
application, in reliance upon and in conformity with written information
prepared and furnished



                                     - 9 -
<PAGE>   10

to the Company by such holder expressly for use therein, and such holder will
reimburse the Company and each such director, officer and controlling Person for
any legal or any other expenses incurred by them in connection with
investigating or defending any such loss, claim, liability, action or
proceeding; provided, however, that the obligation to indemnify will be
individual to each holder and will be limited to the net amount of proceeds
received by such holder from the sale of Registrable Securities pursuant to such
registration statement.

        (c) Any Person entitled to indemnification hereunder will (i) give
prompt written notice to the indemnifying party of any claim with respect to
which it seeks indemnification and (ii) unless in such indemnified party's
reasonable judgment a conflict of interest between such indemnified and
indemnifying parties may exist with respect to such claim, permit such
indemnifying party to assume the defense of such claim with counsel reasonably
satisfactory to the indemnified party; provided the indemnified party may
participate in such defense at such party's expense. If such defense is assumed,
the indemnifying party will not be subject to any liability for any settlement
made by the indemnified party without its consent (but such consent will not be
unreasonably withheld). An indemnifying party who is not entitled to, or elects
not to, assume the defense of a claim will not be obligated to pay the fees and
expenses of more than one counsel for all parties indemnified by such
indemnifying party with respect to such claim, unless in the reasonable judgment
of any indemnified party a conflict of interest may exist between such
indemnified party and any other of such indemnified parties with respect to such
claim.

        (d) The indemnification provided for under this Agreement will remain in
full force and effect regardless of any investigation made by or on behalf of
the indemnified party or any officer, director or controlling Person of such
indemnified party and will survive the transfer of securities. The Company also
agrees to make such provisions, as are reasonably requested by any indemnified
party, for contribution to such party in the event the Company's indemnification
is unavailable for any reason.

     7. Participation in Underwritten Registrations.

        (a) No Person may participate in any registration hereunder which is
underwritten unless such Person (i) agrees to sell such Person's securities on
the basis provided in any underwriting arrangements approved by the Person or
Persons entitled hereunder to approve such arrangements (including, without
limitation, pursuant to the terms of any over-allotment or "green shoe" option
requested by the managing underwriter(s)), except that no holder of Registrable
Securities will be required to sell more than the number of Registrable
Securities that such holder has requested the Company to include in any
registration, and (ii) completes and executes all questionnaires, powers of
attorney, indemnities, underwriting agreements and other documents reasonably
required under the terms of such underwriting arrangements; provided that no
holder of Registrable Securities included in any underwritten registration shall
be required to make any representations or warranties to the Company or the
underwriters other than representations and warranties regarding such holder and
such holder's intended method of distribution.

        (b) Each Person that is participating in any registration hereunder
agrees that, upon receipt of any notice from the Company of the happening of any
event of the kind



                                     - 10 -
<PAGE>   11

described in paragraph 4(a)(v) above, such Person will forthwith discontinue the
disposition of its Registrable Securities pursuant to the registration statement
until such Person's receipt of the copies of a supplemented or amended
prospectus as contemplated by such paragraph 4(a)(v). In the event the Company
shall give any such notice, the applicable time period mentioned in paragraph
4(a)(ii) during which a Registration Statement is to remain effective shall be
extended by the number of days during the period from and including the date of
the giving of such notice pursuant to this paragraph 7(b) to and including the
date when each seller of a Registrable Security covered by such registration
statement shall have received the copies of the supplemented or amended
prospectus contemplated by paragraph 4(a)(v).

        8. Current Public Information. The Company will file all reports
required to be filed by it under the Securities Act and the Securities Exchange
Act and the rules and regulations adopted by the Securities and Exchange
Commission thereunder, and will take such further action as any holder or
holders of Registrable Securities may reasonably request, all to the extent
required to enable such holders to sell Registrable Securities pursuant to Rule
144 or any similar rule or regulation hereafter adopted by the Securities and
Exchange Commission.

     9. Definitions.

     "Common Stock" shall mean the common stock, no par value, of the Company,
and any capital stock of any class of the Company hereafter authorized that is
not limited to a fixed sum or percentage of par or stated value in respect of
the rights of the holders thereof to participate in dividends in the
distribution of assets upon any liquidation, dissolution or winding up of the
Company.

     "Common Stock Equivalents" means (without duplication with any other Common
Stock or Common Stock Equivalents) rights, warrants, convertible securities or
indebtedness, exchangeable securities or indebtedness, or other rights,
exercisable for or convertible or exchangeable into, directly or indirectly,
Common Stock and securities convertible or exchangeable into Common Stock,
whether at the time of issuance or upon the passage of time or the occurrence of
some future event.

     "Public Offering" means a public offering and sale of Common Stock pursuant
to an effective registration statement under the Securities Act.

     "Registrable Securities" means (i) any Common Stock or Common Stock
Equivalents issued upon the conversion of the Tranche A Loan and/or the Tranche
B Loan or the exercise of the Warrants and (ii) any Common Stock issued or
issuable directly or indirectly with respect to the securities referred to in
clause (i) by way of stock dividend, stock conversion or stock split or in
connection with a combination of shares, recapitalization, merger, consolidation
or other reorganization. As to any particular shares constituting Registrable
Securities, such shares will cease to be Registrable Securities when they have
been (x) effectively registered under the Securities Act and disposed of in
accordance with the registration statement covering them, or (y) sold to the
public through a broker, dealer or market maker pursuant to Rule 144 (or any
similar provision then in force) under the Securities Act. For purpose of this
Agreement, a Person will be deemed to be the holder of Registrable Securities
whenever such person has the right to acquire directly or indirectly such
Registrable Securities (upon conversion or exercise in



                                     - 11 -
<PAGE>   12

connection with a transfer of securities or otherwise, but disregarding any
restrictions or limitations upon the exercise of such right), whether or not
such acquisition has actually been effected.

     "Registration Period" means the earlier to occur of (i) the expiration of
one hundred eighty (180) days following the effectiveness of a registration
statement and (ii) the date on which all Registrable Securities covered by such
registration statement have been sold and the distribution contemplated thereby
has been completed.

     "Securities Act" means the Securities Act of 1933, as amended.

     "Securities Exchange Act" means the Securities Exchange Act of 1934, as
amended.

     10. Miscellaneous.

         (a) No Inconsistent Agreements. The Company will not hereafter enter
into any agreement with respect to its securities which is inconsistent with or
violates the rights granted to the holders of Registrable Securities in this
Agreement.

         (b) Adjustments Affecting Registrable Securities. The Company will not
take any action, or permit any change to occur, with respect to its securities
which would adversely affect the ability of the holders of Registrable
Securities to include such Registrable Securities in a registration undertaken
pursuant to this Agreement or which would adversely affect the marketability of
such Registrable Securities in any such registration (including, without
limitation, effecting a stock split or a combination of shares).

         (c) Remedies. The parties hereto agree and acknowledge that money
damages may not be an adequate remedy for any breach of the provisions of this
Agreement and that any party hereto shall have the right to injunctive relief,
in addition to all of its other rights and remedies at law or in equity, to
enforce the provisions of this Agreement.

         (d) Amendments and Waivers. Except as otherwise provided herein, the
provisions of this Agreement may be amended or waived only upon the prior
written consent of the Company and the holders of sixty-six and two-thirds
percent (66 2/3%) of the Registrable Securities.

         (e) Successors and Assigns; Permitted Transfers. This Agreement shall
be binding upon and inure to the benefit of and be enforceable by the parties
hereto and their respective successors and assigns; provided, however, it is
understood and agreed that the Investor may assign its rights hereunder only to
Permitted Transferees (as defined below). Notwithstanding the provisions of this
Agreement to the contrary, it is understood and agreed that any holder of
Registrable Securities may at any time and from time to time without restriction
transfer or recertificate all or a part of such holder's Registrable Securities
(i) to a nominee identified in writing to the Company as being the nominee of or
for such holder, and any nominee of or for a beneficial owner of Registrable
Securities identified in writing to the Company as being the nominee of or for
such beneficial owner may from time to time transfer or recertificate all or a
part of the Registrable Securities registered in the name of such nominee but
held as nominee on behalf of such beneficial owner, to such beneficial owner,
(ii) to an affiliate



                                     - 12 -
<PAGE>   13

of such holder, (iii) to an estate planning trust or other vehicle established
by or for the benefit of such holder, or (iv) to the immediate family of Dr.
John N. Kapoor. The transfers or recertifications described in this Section are
sometimes referred to herein collectively as "Permitted Transfers" and the
recipient of Registrable Securities in a Permitted Transfer is sometimes
referred to herein as a "Permitted Transferee".

         (f) Severability. Whenever possible, each provision of this Agreement
shall be interpreted in such manner as to be effective and valid under
applicable law, but if any provision of this Agreement is held to be prohibited
by or invalid under applicable law, such provision shall be ineffective only to
the extent of such prohibition or invalidity, without invalidating the remainder
of this Agreement.

         (g) Counterparts. This Agreement may be executed in two or more
counterparts, any one of which need not contain the signatures of more than one
party, but all such counterparts taken together will constitute one and the same
Agreement. One or more counterparts of this Agreement may be delivered by
facsimile, with the intention that delivery by such means shall have the same
effect as delivery of an original counterpart thereof.

         (h) Descriptive Headings. The descriptive headings of this Agreement
are inserted for convenience only and do not constitute a part of this
Agreement.

         (i) Governing Law. All issues concerning this Agreement shall be
governed by and construed in accordance with the laws of the State of Illinois,
without giving effect to any choice of law or conflict of law provision of rule
(whether of the State of Illinois or any other jurisdiction) that would cause
the application of the law of any jurisdiction other than the State of Illinois.

         (j) Notices. Any and all notices or other communications required or
permitted to be delivered hereunder shall be deemed properly delivered if (a)
delivered personally, (b) mailed by first class, registered or certified mail,
return receipt requested, postage prepaid, (c) sent by next-day or overnight
mail or delivery or (d) sent by telecopy or telegram, to the parties as set
forth below:


                           If to the Investor:

                                   Dr. John N. Kapoor
                                   c/o EJ Financial, Inc.
                                   225 E. Deerpath Road, Suite 250
                                   Lake Forest, Illinois 60045
                                   Telecopy: (847) 295-8680


                                     - 13 -
<PAGE>   14
                           With a copy to:

                                   Douglas J. Lipke, Esq.
                                   Dana S. Armagno, Esq.
                                   Vedder, Price, Kaufman & Kammholz
                                   222 North LaSalle Street, Suite 2600
                                   Chicago, Illinois  60601-1003
                                   Telecopy: (312) 609-5005

                           If to the Company:

                                   2500 Millbrook Drive
                                   Buffalo Grove, Illinois  60089
                                   Attention: Chief Financial Officer
                                   Telecopy: (847) 279-6123

                           With a copy to:

                                   Christopher R. Manning, Esq.
                                   Barbara Canning, Esq.
                                   Burke, Warren, MacKay & Serritella, P.C.
                                   22nd Floor, IBM Plaza
                                   330 North Wabash Avenue
                                   Chicago, Illinois 60611
                                   Telecopy: (312) 346-8242


Either party may change the name and address of the designee to whom notice
shall be sent by giving written notice of such change to the other party.

         (k) Termination of Registration Rights. Notwithstanding anything
contrary in this Agreement, the Company will not be required to file any
registration statements under paragraphs 1 or 2 if a period of three (3) years
has elapsed subsequent to the effective date of any registration statement filed
pursuant to a Public Offering.

                            [SIGNATURE PAGE FOLLOWS]




                                     - 14 -
<PAGE>   15
         IN WITNESS WHEREOF, the parties have executed this Registration Rights
Agreement as of the date first written above.


                                        AKORN, INC.


                                        By:  /s/ Kevin M. Harris
                                           -------------------------------------
                                        Name:   Kevin M. Harris
                                             -----------------------------------
                                        Title:  CFO
                                              ----------------------------------



                                        THE JOHN N. KAPOOR TRUST DATED
                                        SEPTEMBER 20, 1989

                                        By:  /s/  John N. Kapoor
                                           -------------------------------------
                                        Name:   John N. Kapoor
                                             -----------------------------------
                                        Title:  Trustee
                                              ----------------------------------




                                     - 15 -