<PAGE>

                                                                   EXHIBIT 10.30

                             SUBORDINATION AGREEMENT

The Undersigned, State of North Dakota acting by and through its Industrial
Commission (herein called "SUBORDINATED CREDITOR") for value received, the
receipt and sufficiency of which is hereby acknowledged, and to induce First
National Bank of Omaha, a national banking association (herein called "BANK"),
at its option at any time or from time to time to loan monies to or for the
account of Red Trail Energy, LLC, a North Dakota limited liability company,
(herein called "BORROWER"), and at the special insistence and request of BANK,
SUBORDINATED CREDITOR hereby agrees with BANK as follows:

1. To induce BANK to lend or advance monies, or otherwise extend credit to
BORROWER, in the form of the SUPERIOR INDEBTEDNESS, or in any manner, and to
better secure BANK in respect thereof, SUBORDINATED CREDITOR hereby subordinates
all liens, mortgages, deeds of trust, and debts of the SUBORDINATED DEBT to the
SUPERIOR INDEBTEDNESS. The liens of SUBORDINATED CREDITOR shall hereafter always
be junior and inferior to the SUPERIOR INDEBTEDNESS, and to any security
interests held by BANK to secure the same. Notwithstanding the foregoing, the
liens of SUBORDINATED CREDITOR shall hereinafter be junior and inferior to the
SUPERIOR INDEBTEDNESS, and by any security interests held by the BANK to secure
the same, until the SUPERIOR INDEBTEDNESS is paid in full.

2. The payment of any and all SUBORDINATED DEBT is expressly subordinated to the
extent and in the manner set forth in this agreement hereof to SUPERIOR
INDEBTEDNESS. The term "SUBORDINATED DEBT" as used in this Subordination
Agreement shall mean and include any and all indebtedness, liabilities and
obligations of the BORROWER to the SUBORDINATED CREDITOR, absolute or
contingent, direct or indirect, joint, several or independent, now outstanding
or owing or which may hereafter be existing or incurred, arising by operation of
law or otherwise, due or to become due, or held or to be held by the
SUBORDINATED CREDITOR, whether created directly or acquired by assignment, as a
participation, conditionally, as collateral security from another or otherwise,
including indebtednesses, obligations and liabilities of BORROWER to
SUBORDINATED CREDITOR as a member of any partnership, syndicate, association or
other group, and whether incurred by BORROWER as principal, surety, endorser,
guarantor, accommodation party or otherwise.

     The term "SUPERIOR INDEBTEDNESS" as used in this Subordination Agreement
shall mean and include any and all indebtednesses, liabilities and obligations
of the BORROWER to BANK, absolute or contingent, direct or indirect, joint,
several or independent, now outstanding or owing or which may hereafter be
existing or incurred, arising by operation of law or otherwise, due or to become
due, or held or to be held by BANK, whether created directly or acquired by
assignment, as a participation, conditionally, as collateral security from
another or otherwise, including indebtednesses, obligations and liabilities of
BORROWER to BANK as a member of any partnership, syndicate, association or other
group, and whether incurred by BORROWER as principal, surety, endorser,
guarantor, accommodation party or otherwise.

3. If for any reason any of the SUPERIOR INDEBTEDNESS is not paid when due or is
not paid on or before the maturity thereof, or if there shall occur and be
continuing any event which

<PAGE>

with the giving of notice or lapse of time or both would constitute a default or
event of default under any instrument or agreement now or hereafter executed
evidencing, in connection with, as security for or providing for the issuance of
any of the SUPERIOR INDEBTEDNESS, then, unless and until such event of default
or default shall have been cured, or unless and until the SUPERIOR INDEBTEDNESS
shall be paid in full, the SUBORDINATED CREDITOR will not ask for, sue for,
take, demand, receive or accept from the BORROWER, by setoff or in any other
manner, any payment or distribution on account of the SUBORDINATED DEBT for
payment (other than such presentment as may be necessary to prevent discharge of
other liable parties on such instrument). Provided, however. BORROWER may pay
and SUBORDINATED CREDITOR may receive regular, annual scheduled payments of
principal on the SUBORDINATED DEBT until there exists a default on the SUPERIOR
INDEBTEDNESS. BANK shall provide SUBORDINATED CREDITOR with notice upon
BORROWER'S default and the BANK's election to accelerate the SUPERIOR
INDEBTEDNESS and upon the payment in full of the SUPERIOR INDEBTEDNESS.

4. The SUBORDINATED CREDITOR will not ask for, demand, sue for, take, receive or
accept from the BORROWER, by setoff or in any other manner, any payment or
distribution on account of the SUBORDINATED DEBT, if the making of such payment
would constitute or would result in the occurrence of a violation of the
provisions of any instrument or agreement evidencing, in connection with, as
security for or providing for the issuance of any SUPERIOR INDEBTEDNESS or would
result in the occurrence of any event which with the giving of notice or lapse
of time or both would constitute an event of default or default under the
provisions of any such instrument or agreement.

5. In the event the SUBORDINATED CREDITOR shall receive any payment or
distribution on account of the SUBORDINATED DEBT which SUBORDINATED CREDITOR is
not entitled to receive under the provisions of this Agreement, SUBORDINATED
CREDITOR will hold any amount so received in trust for the BANK and will
forthwith turn over such payment to the BANK in the form received by
SUBORDINATED CREDITOR to be applied on the SUPERIOR INDEBTEDNESS.

6. The SUBORDINATED CREDITOR will not commence any action or proceeding against
the BORROWER to recover all or any part of the SUBORDINATED DEBT, foreclose or
commence a sale of real property under any mortgage or deed of trust, or join
with any other creditor, unless the BANK shall also join, in bringing any
proceedings against the BORROWER under any bankruptcy, reorganization,
readjustment of debt, arrangement of debt, receivership, liquidation or
insolvency law or statute of the Federal or any state government unless and
until all SUPERIOR INDEBTEDNESS shall have been paid in full.

7. The SUBORDINATED CREDITOR agrees that any insurance proceeds due or
condemnation awards paid for loss to the PROJECT, as defined in the Construction
Loan Agreement between BANK and BORROWER dated December 16, 2005, and all
amendments thereto, shall be applied to the SUPERIOR INDEBTEDNESS or used to
reconstruct or repair the PROJECT, as determined by BANK in its reasonable
discretion.

                                      -2-
<PAGE>

8. In the event of any receivership, insolvency, bankruptcy, assignment for the
benefit of creditors, reorganization or arrangement with creditors, adjustment
of debt, whether or not pursuant to bankruptcy law, the sale of all or
substantially all of the assets, dissolution, liquidation, or any other
marshaling of the assets and liabilities of the BORROWER, the SUBORDINATED
CREDITOR will at the BANK'S reasonable request file any claim, proof of claim or
other instrument of similar character necessary to enforce the obligations of
the BORROWER in respect of the SUBORDINATED DEBT and will hold in trust for the
BANK and pay over to the BANK, in the form received, to be applied on the
SUPERIOR INDEBTEDNESS any and all monies, dividends or other assets received in
any such proceedings on account of the SUBORDINATED DEBT unless and until the
SUPERIOR INDEBTEDNESS shall be paid in full. In the event that the SUBORDINATED
CREDITOR shall fail to take any such action requested by BANK, the BANK may, as
attorney-in-fact for SUBORDINATED CREDITOR take such action on behalf of
SUBORDINATED CREDITOR, and SUBORDINATED CREDITOR hereby appoints the BANK as
attorney-in-fact for such SUBORDINATED CREDITOR to demand, sue for, collect and
receive any and all such monies, dividends or other assets and give acquittance
therefor and to file any claim, proof of claim or instrument of similar
character and to take such other proceedings in the BANK'S own name or in the
name of SUBORDINATED CREDITOR as the BANK may deem necessary or advisable for
the enforcement of this Subordination Agreement.

9. The BANK may, at any time, and from time to time, without the consent of or
notice to the SUBORDINATED CREDITOR, without incurring responsibility to the
SUBORDINATED CREDITOR and without impairing or releasing any of the BANK'S
rights or any of the obligations of the SUBORDINATED CREDITOR under this
Subordination Agreement:

     a.   Change the manner, place or terms of payment, or change or extend for
          any period the time of payment of, or renew or otherwise alter, the
          SUPERIOR INDEBTEDNESS or any instrument or agreement now or hereafter
          executed evidencing, in connection with, as security for or providing
          for the issuance of any of the SUPERIOR INDEBTEDNESS in any manner or
          enter into or amend in any manner any other agreement relating to the
          SUPERIOR INDEBTEDNESS. Provided, however, BANK agrees that it will
          not, without consent of SUBORDINATED CREDITOR, amend or change any
          provisions restricting or further restricting payment of SUBORDINATED
          DEBT;

     b.   Sell, exchange, release or otherwise deal with all or any part of any
          property by whomsoever at any time pledged or mortgaged to secure,
          howsoever securing, the SUPERIOR INDEBTEDNESS;

     c.   Release anyone liable in any manner for payment or collection of the
          SUPERIOR INDEBTEDNESS;

     d.   Exercise or refrain from exercising any rights against the BORROWER or
          SUBORDINATED CREDITOR; and

                                      -3-
<PAGE>
      e.    Apply any sums received by the BANK, by whomsoever paid and however
            realized, to payment of the SUPERIOR INDEBTEDNESS in such a manner
            as the BANK, in its sole discretion, may deem appropriate.

10.The SUBORDINATED CREDITOR will (i) cause all SUBORDINATED DEBT to be
evidenced by a note, debenture or other instrument evidencing the SUBORDINATED
DEBT, (ii) at the BANK's request promptly surrender or cause to be surrendered
any such note, debenture, or instrument evidencing the SUBORDINATED DEBT so that
a statement or legend may be entered thereon to the effect that such note,
debenture, or other instrument is subordinated to SUPERIOR INDEBTEDNESS in favor
of the BANK in the manner and to the extent set forth in this Subordination
Agreement, (iii) mark the books of SUBORDINATED CREDITOR to show that the
SUBORDINATED DEBT is subordinated to the SUPERIOR INDEBTEDNESS in the manner and
to the extent set forth in this Subordination Agreement, and (iv) cause all
financial statements of the SUBORDINATED CREDITOR hereafter prepared for
delivery to any person to make specific reference to the provisions of this
Subordination Agreement.

11.The SUBORDINATED CREDITOR agrees to execute any and all other instruments
necessary as reasonably required by the BANK to subordinate the SUBORDINATED
DEBT to the SUPERIOR INDEBTEDNESS as herein provided.

12. SUBORDINATED CREDITOR will not assign or transfer to others any claim the
SUBORDINATED CREDITOR has or may have against the BORROWER as long as any of the
SUPERIOR INDEBTEDNESS remains outstanding, unless such assignment or transfer is
expressly made subject to this Subordination Agreement.

13. The SUBORDINATED CREDITOR represents and warrants that (i) neither the
execution nor delivery of this Subordination Agreement, nor fulfillment of or
compliance with the terms and provisions hereof will conflict with, or result in
a breach of the terms, conditions or provisions of, or constitute a default
under, any agreement or instrument to which SUBORDINATED CREDITOR is now
subject, and (ii) none of the SUBORDINATED DEBT is or will be subordinated to
any other indebtednesses of the BORROWER other than the SUPERIOR INDEBTEDNESS
unless otherwise agreed by the BANK.

14. This Subordination Agreement may be assigned by the BANK in connection with
any assignment or transfer of SUPERIOR INDEBTEDNESS. BANK shall provide
SUBORDINATED CREDITOR notice of any assignment or transfer.

15. This Subordination Agreement shall be construed under and governed by the
laws of the State of Nebraska.

16. SUBORDINATED CREDITOR warrants to BANK the total balance due from BORROWER
to SUBORDINATED CREDITOR is presently $350,000.00.

17. This Agreement may be executed in counterparts, each of which shall
constitute an original but all of which when taken together shall constitute but
one contract, and shall become

                                      -4-
<PAGE>

effective when copies hereof which, when taken together, bear the signatures of
each of the parties hereto shall be delivered to the BANK.

      IN WITNESS WHEREOF, the parties have executed this Agreement as of the
dates set forth below.

RED TRAIL ENERGY, LLC ("BORROWER")

By: /s/ William N. DuToit                           Date: 5-16-06
    ---------------------
Title: TREASURER

And

By: /s/ Ambrose R. Hoff                             Date: 5-16-06
    --------------------
Title: PRESIDENT

FIRST NATIONAL BANK OF OMAHA ("BANK")

By: /s/ Mark Baratta                                Date: 5-16-06
    --------------------
Title: VICE PRESIDENT

STATE OF NORTH DAKOTA acting by and through its INDUSTRIAL COMMISSION
("SUBORDINATED CREDITOR")

By: /s/ KARLENE FINE                                Date: May 11, 2006
    --------------------
Title: EXECUTIVE DIRECTOR & SECRETARY

                                      -5-