Exhibit 5.1 [LETTERHEAD OF LEE AND LI] July 5, 2005 Ref. No. 05-0050 T12073/M102-6 Taiwan Semiconductor Manufacturing Company Limited No. 8, Li-Hsin Road 6 Hsinchu Science Park Hsinchu, Taiwan Republic of China Ladies and Gentlemen: We act as special Republic of China (the "ROC") counsel for Taiwan Semiconductor Manufacturing Company Limited (the "Company"), a company limited by shares organized under the laws of the ROC, in connection with the registration under the United States Securities Act of 1933, as amended (the "Act"), and the contemplated issuance of American Depositary Shares (the "ADSs"), each ADS representing 5 common shares, par value NT$10 per share (the "Common Shares"), of the Company. The Common Shares are being registered pursuant to a Registration Statement on Form F-3 under the Act (the "Registration Statement"). We have examined originals or copies, certified or otherwise identified to our satisfaction, of such documents and records of the Company as we have deemed necessary as a basis for the opinions hereinafter expressed. In such examination, we have assumed the genuineness of all signatures, the authenticity of all documents submitted to us as originals, the accuracy and completeness of all documents submitted to us as copies and authenticity of the originals of such latter documents. As to matters of fact material to this opinion, we have made due inquiries with and relied on the statements of officers and other representatives of the Company, public officials or others. Based upon the foregoing, we are of the opinion that: 1. The company has been duly incorporated and is validly existing as a company limited by shares under the laws of the ROC. 2. The Common Shares underlying the ADSs have been duly authorized, issued, fully-paid and non-assessable. [LEE AND LI LOGO] -2- 3. Subject to the conditions and qualifications described in the Registration Statement, the section of the prospectus included in the Registration Statement entitled "Taxation -- ROC Taxation", insofar as it relates to the ROC tax consequences currently applicable to the non-ROC holders of ADSs described therein, accurately reflects the material ROC tax consequences of owning ADSs. We hereby consent to the use of this opinion in, and the filing hereof as an Exhibit to, the Registration Statement, and to the reference to our name under the headings "Enforceability of Civil Liabilities" and "Validity of Securities" in the prospectus included in the Registration Statement. In giving such consent, we do not thereby admit that we come within the category of person whose consent is required under Section 7 of the Act or the regulations promulgated thereunder. Very truly yours, LEE AND LI /s/ Alex Jui-Lin Liu /s/ Grace Wang - ---------------------------- ---------------------------- Alex Jui-Lin Liu Grace Wang