Exhibit 5(a)

[MW letterhead]

November 9, 2011

Merrill Lynch & Co., Inc.

Bank of America Corporate Center

100 North Tryon Street

Charlotte, North Carolina 28255

 

Re: Registration Statement on Form S-8

$200,000,000 Deferred Compensation Obligations of Merrill Lynch & Co., Inc.

Pursuant to the Merrill Lynch & Co., Inc. 2012 Performance Year Deferred Compensation Plan

Ladies and Gentlemen:

We have acted as counsel to Merrill Lynch & Co., Inc., a Delaware corporation (the “Company”), in connection with the preparation and filing of a Registration Statement on Form S-8 (the “Registration Statement”) under the Securities Act of 1933, as amended (the “Act”), relating to the registration by the Company of up to $200,000,000 of Deferred Compensation Obligations (the “Deferred Compensation Obligations”), which represent unsecured obligations of the Company to pay deferred compensation in the future in accordance with the terms of the Merrill Lynch & Co., Inc. 2012 Performance Year Deferred Compensation Plan (the “Plan”).

In rendering the opinion set forth below, we have examined such corporate records and other documents, including the Registration Statement, the Company’s Restated Certificate of Incorporation, the Company’s By-Laws, and the Plan, and such other documents and records as we have considered relevant and necessary as a basis for this opinion.

Based on the foregoing, it is our opinion that, when issued in accordance with the terms of the Plan, the Deferred Compensation Obligations will be valid and binding obligations of the Company, enforceable in accordance with their terms, except as enforcement thereof may be limited by bankruptcy, insolvency or other laws of general application relating to or affecting enforcement of creditors’ remedies or by general principles of equity.

This opinion is rendered to you and for your benefit solely in connection with the registration of the Deferred Compensation Obligations to be offered and sold by the Company in connection with the Plan. This opinion may not be relied on by you for any other purpose and may not be relied upon by, nor may copies thereof be provided to, any other person, firm, corporation, or entity for any purposes whatsoever without our prior written consent. Notwithstanding the foregoing, we hereby consent to be named in the Registration Statement as the attorneys who passed upon the legality of the Deferred Compensation Obligations, and to the filing of a copy of this opinion as an exhibit to the Registration Statement. In giving this consent, we do not admit thereby that we are in the category of persons whose consent is required under Section 7 of the Securities Act of 1933.

Very truly yours,

/S/ MCGUIRE WOODS LLP