EX-5

Exhibit 5

May 17, 2013

Union Pacific Corporation

1400 Douglas Street

Omaha, Nebraska 68179

Re: Registration Statement on Form S-8

Ladies and Gentlemen:

As Associate General Counsel of Union Pacific Corporation, a Utah corporation (the “Company”), I am familiar with the registration under the Securities Act of 1933, as amended (the “Act”), of 20,000,000 shares of the common stock, $2.50 par value per share, of the Company (“Common Stock”), issuable by the Company, pursuant to the Company’s 2013 Stock Incentive Plan (the “Plan”).

In connection therewith, I have participated in the preparation of the Registration Statement on Form S-8 relating to the registration under the Act of the above-mentioned shares of Common Stock, which is being filed this date with the Securities and Exchange Commission, and I have supervised and am familiar with all corporate and shareholder proceedings taken to date in connection with the authorization and approval of the Plan.

I have examined and relied upon originals or copies, certified or otherwise authenticated to my satisfaction, of all corporate records, documents, agreements or other instruments of the Company and have made such investigation of law as I have deemed necessary or appropriate as a basis for the opinions hereinafter expressed. Unless otherwise defined herein, terms used herein shall have the same meanings as defined in the Plan.

Based upon the foregoing, I am of the opinion that:

The 20,000,000 shares of Common Stock when issued and delivered pursuant to the provisions of the Plan contemplated will be duly authorized, validly issued, fully paid and non-assessable.

I hereby consent to the reference made to me in the Registration Statement on Form S-8 filed the date hereof and to the filing of this opinion as Exhibit 5 to such Registration Statement.

 

Very truly yours,

/s/ James J. Theisen, Jr.