
<PAGE>   1

                                                                     EXHIBIT 5.1

                      [MORRISON & FOERSTER LLP LETTERHEAD]

                                  May 23, 2000

JDS Uniphase Corporation
163 Baypointe Parkway
San Jose, California 95134

Ladies and Gentlemen:

     At your request, we have examined the Registration Statement on Form S-4,
including the proxy statement-prospectus forming a part thereof, filed by you
with the Securities and Exchange Commission on February 11, 2000 and
subsequently to be amended (the "Registration Statement"), in connection with
the registration under the Securities Act of 1933, as amended, of 156,083,400
shares of your common stock, $.001 par value per share (the "Stock"). The Stock
will be issued to the former stockholders of E-TEK Dynamics, Inc. ("E-TEK"), a
Delaware corporation, pursuant to the terms of that certain Agreement and Plan
of Reorganization and Merger, dated as of January 17, 2000, by and among you,
Rainbow Acquisition, Inc., a Delaware corporation and your wholly-owned
subsidiary, and E-TEK (the "Merger Agreement"). As counsel to the Company and
in connection with this opinion, we have examined all proceedings taken by you
in connection with the registration of the Stock.

     It is our opinion that the Stock, which is being issued by you in exchange
for the shares of common stock of E-TEK pursuant to the Merger Agreement, when
issued in the manner described in the Registration Statement will be legally
and validly issued, fully paid and nonassessable.

     We consent to the use of this opinion as an exhibit to the Registration
Statement and further consent to all references to us in the Registration
Statement and any amendments thereto. In giving this consent, we do not thereby
admit that we are in the category of persons whose consent is required under
Section 7 of the Securities Act of 1933, as amended.

                              Very truly yours,

                              /s/ MORRISON & FOERSTER LLP

