<PAGE>
 
                    [LETTERHEAD OF ANDREWS & KURTH L.L.P.]

                                                                     EXHIBIT 5.1

                                March 11, 1998


Board of Directors
Wainoco Oil Corporation
10000 Memorial Drive, Suite 600
Houston, Texas 77024-3411

Gentlemen:

     We have acted as counsel to Wainoco Oil Corporation, a Wyoming corporation
(the "Company"), in connection with the Company's Registration Statement on Form
S-4 (the "Registration Statement") relating to the registration under the
Securities Act of 1933, as amended (the "Securities Act"), of the offer by the
Company to exchange up to $70,000,000 aggregate principal amount of its 9 1/8%
Senior Notes due 2006, Series A (the "Exchange Notes") for its existing 9 1/8%
Senior Notes due 2006 (the "Old Notes").  The Exchange Notes are proposed to be
issued in accordance with the provisions of the Indenture, dated as of February
9, 1998, between the Company and Chase Bank of Texas, National Association, as
Trustee (the "Indenture").

     As the basis for the opinions expressed below, we have examined the
Registration Statement, the Prospectus contained therein, the Indenture, which
is filed as an exhibit to the Registration Statement, and such statutes,
regulations, corporate records and documents, certificates of corporate and
public officials and other instruments as we have deemed necessary or advisable
for the purposes of this opinion.  In such examination, we have assumed (i) that
the signatures on all documents that we have examined are genuine, (ii) the
authenticity of all documents submitted to us as originals, and (iii) the
conformity with the original documents of all documents submitted to us as
copies.

     Based upon the foregoing and having due regard for such legal
considerations as we deem relevant, we are of the opinion that the Exchange
Notes, (a) when exchanged in the manner described in the Registration Statement,
(b) when duly executed, authenticated, issued and delivered in accordance with
the terms of the Indenture, (c) when the Indenture has been duly qualified under
the Trust Indenture Act of 1939, as amended, and (d) when applicable provisions
of  "blue sky" laws have been complied with, will be legally issued and
constitute binding obligations of the Company, enforceable against the Company
in accordance with their terms and the terms of the Indenture.

     The opinion expressed above with respect to the Exchange Notes may be
limited by applicable bankruptcy, insolvency (including, without limitation, all
laws relating to fraudulent transfer,
<PAGE>
 
Wainoco Oil Corporation
March 11th, 1998
Page 2



reorganization, moratorium and other similar laws affecting creditors' rights
generally and by general principles of equity (regardless of whether enforcement
is sought in a proceeding in equity or at law)). Such opinion is also subject to
the qualification that the remedy of specific performance and other forms of
equitable relief may be subject to equitable defenses and to the discretion of
the court before which proceedings may be brought.

     This opinion is limited in all respects to the laws of the States of New
York and Texas, and the laws of the United States of America insofar as such
laws are applicable.  We hereby consent to the use of this opinion as an exhibit
to the Registration Statement and to the use of the firm name under the heading
"Legal Matters" in the Registration Statement.

                              Very truly yours,

                              ANDREWS & KURTH L.L.P.

1173/1213/2647