<Page> Exhibit 5.1 BROWN, WINICK, GRAVES, GROSS, BASKERVILLE AND SCHOENEBAUM, P.L.C. ATTORNEYS AT LAW <Table> 666 GRAND AVENUE, SUITE 2000 Marvin Winick Alice Eastman Helle Miranda L. Hughes James S. Niblock DES MOINES, IOWA 50309-2510 Richard W. Baskerville Michael R. Blaser Duane P. Hagerty Ann Holden Kendell Bruce Graves Thomas D. Johnson James A. Napier Rebecca A. Brommel TELEPHONE: (515) 242-2400 Steven C. Schoenebaum Charles J. Krogmeier Christine B. Long FACSIMILE: (515) 283-0231 Harold N. Schneebeck Christopher R. Sackett Kelly D. Hamborg Paul D. Hietbrink Sean P. Moore William E. Hanigan URL: www.ialawyers.com William C. Brown Stuart I. Feldstein Mary A. Ericson Patents and Trademarks Richard K. Updegraff Nancy S. Boyd Deborah J. Schmudlach James A. Napier Offices in: Jill Thompson Hansen James L. Pray Danielle K. Dixon Pella, Iowa Paul E. Carey Brenton D. Soderstrum Brian P. Rickert Washington, D.C. Office Washington, D.C. Douglas E. Gross Fred L. Morris Anna N. Evans Brian Kennedy John D. Hunter Michael D. Treinen Jeffrey L. Himrich James H. Gilliam Scott L. Long Valerie D. Bandstra Robert D. Andeweg Ronni F. Begleiter Alexander M. Johnson Walter R. Brown (1921-2000) WRITER'S DIRECT DIAL NO. (515) 242-2473 WRITER'S E-MAIL ADDRESS hanigan@ialawyers.com </Table> October 21, 2002 The Board of Directors East Kansas Agri-Energy, L.L.C. 20477 S.W. Florida Road Westphalia, Kansas 66093 RE: 2002 Registration Statement Dear Sirs: In connection with the proposed offer and sale of up to 18,000 units of the membership interests (the "Membership Units") of East Kansas Agri-Energy, L.L.C. (the "Company"), we have made such legal examination and inquiries as we have deemed advisable or necessary for the purpose of rendering this opinion and have examined originals or copies of the following documents and corporate records: 1. The Company's Articles of Organization; 2. The Company's Operating Agreement; 3. The Company's resolutions of the Board of Directors authorizing the issuance of units; and 4. The Company's Registration Statement, as filed by East Kansas Agri-Energy, L.L.C. with the United States Securities and Exchange Commission on July 11, 2002. In rendering our opinions we have relied upon, with the consent of the Company and its members: (i) the representations of the Company and its members and other representatives as set forth in the aforementioned documents only as to those factual matters that we were unable to ascertain ourselves; and (ii) certificates and assurances from public officials and from members and other representatives of the Company as we have deemed necessary for purposes of expressing the opinions expressed herein. We have not undertaken any independent investigation to determine or verify any information and representations made by the Company and its members and representatives in the foregoing documents or in such certificates, and we have relied upon such information and representations in expressing our opinions. <Page> October 21, 2002 Page 2 We have assumed in rendering these opinions that no person or party has taken any action inconsistent with the terms of the above-described documents or prohibited by law. We have confirmed that no attorney in this office that has provided legal services to the Company within the past six months has notice or knowledge of any misstatements or inaccuracies in the representation upon which we have relied. The opinions expressed herein shall be effective only as of the date of this opinion letter. The opinions set forth herein are based upon existing law and regulations, all of which are subject to change prospectively and retroactively. Our opinions are based on the facts and the above documents as they exist on the date of this letter, and we assume no obligation to revise or supplement such opinions as to future changes of law or fact. This opinion letter is limited to the matters stated herein and no opinions are to be implied or inferred beyond the matters expressly stated herein. Based on our examination and inquiry, we are of the opinion that, upon effectiveness of the Registration Statement, and when issued and sold in the manner referred to in the Registration Statement and under the applicable subscription agreement(s), the Membership Units will be duly authorized, fully paid and non-assessable. Very truly yours, Bill Hanigan WEH:tlk