Form: S-3ASR

Automatic shelf registration statement of securities of well-known seasoned issuers

March 2, 2009


QuickLinks -- Click here to rapidly navigate through this document


Exhibit 5.1

February 27, 2009

AvalonBay Communities, Inc.
2900 Eisenhower Avenue, Suite 300
Alexandria, VA 22314

    Re:
    Securities Being Registered under Registration Statement on Form S-3

Ladies and Gentlemen:

        This opinion letter is furnished to you in connection with your filing of a Registration Statement on Form S-3 (as amended or supplemented, the "Registration Statement") pursuant to the Securities Act of 1933, as amended (the "Securities Act"), relating to the registration of (i) common stock, par value $0.01 per share (the "Common Stock"), of AvalonBay Communities, Inc., a Maryland corporation (the "Company"), (ii) preferred stock, par value $0.01 per share, of the Company (the "Preferred Stock") and (iii) debt securities of the Company ("Debt Securities"). The Common Stock, Preferred Stock and Debt Securities are sometimes referred to collectively herein as the "Securities." Securities may be issued in an unspecified number (with respect to Common Stock or Preferred Stock) or in an unspecified principal amount (with respect to Debt Securities). The Registration Statement provides that the Securities may be offered separately or together, in separate series, in amounts, at prices and on terms to be set forth in one or more prospectus supplements (each a "Prospectus Supplement") to the prospectus contained in the Registration Statement.

        We have reviewed such documents and made such examination of law as we have deemed appropriate to give the opinions expressed below. We have relied, without independent verification, on certificates of public officials and, as to matters of fact material to the opinions set forth below, on certificates of officers of the Company.

        The opinions expressed below are limited to the Maryland General Corporation Law (which includes applicable provisions of the Maryland Constitution and reported judicial decisions interpreting the Maryland General Corporation Law and the Maryland Constitution) and the federal law of the United States. Without limiting the generality of the foregoing, we express no opinion with respect to (i) state securities or "Blue Sky" laws, or (ii) state or federal antitrust laws.

        For purposes of the opinions expressed below, without limiting any other exceptions or qualifications set forth herein, we have assumed that after the issuance of any Securities offered pursuant to the Registration Statement, the total number of issued shares of Common Stock or Preferred Stock, as applicable, together with the total number of shares of such stock reserved for issuance upon the exercise, exchange, conversion or settlement, as the case may be, of any exercisable, exchangeable or convertible security, as the case may be, then outstanding, will not exceed the total number of authorized shares of Common Stock or Preferred Stock, as applicable, under the Company's Articles of Incorporation, as amended and then in effect (the "Articles of Incorporation").

        For purposes of the opinions expressed below, we refer to the following as the "Future Authorization and Issuance" of Securities:

    •
    with respect to any of the Securities, (a) the authorization by the Company of the terms and issuance of such Securities (the "Authorization") and (b) the issuance of such Securities in accordance with the Authorization therefor upon the receipt by the Company of the consideration (which, in the case of shares of Common Stock or Preferred Stock, is not less than the par value of such shares) to be paid therefor in accordance with the Authorization;

    •
    with respect to Preferred Stock, (a) the establishment of the terms of such Preferred Stock by the Company in conformity with the Articles of Incorporation and applicable law and (b) the execution, acknowledgement and filing with the State Department of Assesments and Taxation of Maryland, and the effectiveness of, a certificate of designations to the Articles of Incorporation

      setting forth the terms of such Preferred Stock in accordance with the Articles of Incorporation and applicable law; and

    •
    with respect to Debt Securities, (a) the authorization, execution and delivery of the indenture or a supplemental indenture relating to such Securities by the Company and the trustee thereunder and/or (b) the establishment of the terms of such Securities by the Company in conformity with the applicable indenture or supplemental indenture and applicable law and (c) the execution, authentication and issuance of such Securities in accordance with the applicable indenture or supplemental indenture and applicable law.

        Based upon the foregoing, and subject to the additional qualifications set forth below, we are of the opinion that:

    •
    Upon the Future Authorization and Issuance of shares of Common Stock, such shares of Common Stock, and the Preferred Stock Purchase Rights attached thereto, will be validly issued, fully paid and nonassessable.

    •
    Upon the Future Authorization and Issuance of shares of Preferred Stock, such shares of Preferred Stock will be validly issued, fully paid and nonassessable.

    •
    Upon the Future Authorization and Issuance of Debt Securities, such Debt Securities will be valid and legally binding obligations of the Company.

        The opinions expressed above, as they relate to the Debt Securities, are subject to bankruptcy, insolvency, fraudulent transfer, reorganization, moratorium and other similar laws of general application affecting the rights and remedies of creditors and to general principles of equity.

        This opinion letter and the opinions it contains shall be interpreted in accordance with the Legal Opinion Principles issued by the Committee on Legal Opinions of the American Bar Association's Business Law Section as published in 53 Business Lawyer 831 (May 1998).

        We hereby consent to the inclusion of this opinion as Exhibit 5.1 to the Registration Statement and to the references to our firm under the caption "Legal Matters" in the Registration Statement. In giving our consent, we do not admit that we are in the category of persons whose consent is required under Section 7 of the Securities Act or the rules and regulations thereunder.

    Very truly yours,

 

 

/s/ GOODWIN PROCTER LLP
GOODWIN PROCTER LLP



QuickLinks