SECTION 1. SHORT TITLE.

    This Act may be cited as the ``Marijuana Justice Act of 2017''.

SEC. 2. DE-SCHEDULING MARIHUANA.

    (a) Marihuana Removed From Schedule of Controlled Substances.--
Subsection (c) of schedule I of section 202(c) of the Controlled 
Substances Act (21 U.S.C. 812) is amended--
            (1) by striking ``marihuana''; and
            (2) by striking ``tetrahydrocannabinols''.
    (b) Removal of Prohibition on Import and Export.--Section 1010(b) 
of the Controlled Substances Import and Export Act (21 U.S.C. 960) is 
amended--
            (1) in paragraph (1)--
                    (A) in subparagraph (F), by inserting ``or'' after 
                the semicolon;
                    (B) by striking subparagraph (G); and
                    (C) by redesignating subparagraph (H) as 
                subparagraph (G);
            (2) in paragraph (2)--
                    (A) in subparagraph (F), by inserting ``or'' after 
                the semicolon;
                    (B) by striking subparagraph (G); and
                    (C) by redesignating subparagraph (H) as 
                subparagraph (G);
            (3) in paragraph (3), by striking ``paragraphs (1), (2), 
        and (4)'' and inserting ``paragraphs (1) and (2)'';
            (4) by striking paragraph (4); and
            (5) by redesignating paragraphs (5), (6), and (7) as 
        paragraphs (4), (5), and (6), respectively.
    (c) Conforming Amendments to Controlled Substances Act.--The 
Controlled Substances Act (21 U.S.C. 801 et seq.) is amended--
            (1) in section 102(44) (21 U.S.C. 802(44)), by striking 
        ``marihuana,'';
            (2) in section 401(b) (21 U.S.C. 841(b))--
                    (A) in paragraph (1)--
                            (i) in subparagraph (A)--
                                    (I) in clause (vi), by inserting 
                                ``or'' after the semicolon;
                                    (II) by striking (vii); and
                                    (III) by redesignating clause 
                                (viii) as clause (vii);
                            (ii) in subparagraph (B)--
                                    (I) by striking clause (vii); and
                                    (II) by redesignating clause (viii) 
                                as clause (vii);
                            (iii) in subparagraph (C), in the first 
                        sentence, by striking ``subparagraphs (A), (B), 
                        and (D)'' and inserting ``subparagraphs (A) and 
                        (B)'';
                            (iv) by striking subparagraph (D);
                            (v) by redesignating subparagraph (E) as 
                        subparagraph (D); and
                            (vi) in subparagraph (D)(i), as so 
                        redesignated, by striking ``subparagraphs (C) 
                        and (D)'' and inserting ``subparagraph (C)'';
                    (B) by striking paragraph (4); and
                    (C) by redesignating paragraphs (5), (6), and (7) 
                as paragraphs (4), (5), and (6), respectively;
            (3) in section 402(c)(2)(B) (21 U.S.C. 842(c)(2)(B)), by 
        striking ``, marihuana,'';
            (4) in section 403(d)(1) (21 U.S.C. 843(d)(1)), by striking 
        ``, marihuana,'';
            (5) in section 418(a) (21 U.S.C. 859(a)), by striking the 
        last sentence;
            (6) in section 419(a) (21 U.S.C. 860(a)), by striking the 
        last sentence;
            (7) in section 422(d) (21 U.S.C. 863(d))--
                    (A) in the matter preceding paragraph (1), by 
                striking ``marijuana,''; and
                    (B) in paragraph (5), by striking ``, such as a 
                marihuana cigarette,''; and
            (8) in section 516(d) (21 U.S.C. 886(d)), by striking 
        ``section 401(b)(6)'' each place the term appears and inserting 
        ``section 401(b)(5)''.
    (d) Other Conforming Amendments.--
            (1) National forest system drug control act of 1986.--The 
        National Forest System Drug Control Act of 1986 (16 U.S.C. 559b 
        et seq.) is amended--
                    (A) in section 15002(a) (16 U.S.C. 559b(a)) by 
                striking ``marijuana and other'';
                    (B) in section 15003(2) (16 U.S.C. 559c(2)) by 
                striking ``marijuana and other''; and
                    (C) in section 15004(2) (16 U.S.C. 559d(2)) by 
                striking ``marijuana and other''.
            (2) Interception of communications.--Section 2516 of title 
        18, United States Code, is amended--
                    (A) in subsection (1)(e), by striking 
                ``marihuana,''; and
                    (B) in subsection (2) by striking ``marihuana,''.

SEC. 3. INELIGIBILITY FOR CERTAIN FUNDS.

    (a) Definitions.--In this section--
            (1) the term ``covered State'' means a State that has not 
        enacted a statute legalizing marijuana in the State;
            (2) the term ``disproportionate arrest rate'' means--
                    (A) the percentage of minority individuals arrested 
                for a marijuana related offense in a State is higher 
                than the percentage of the non-minority individual 
                population of the State, as determined by the most 
                recent census data; or
                    (B) the percentage of low-income individuals 
                arrested for a marijuana offense in a State is higher 
                than the percentage of the population of the State that 
                are not low-income individuals, as determined by the 
                most recent census data;
            (3) the term ``disproportionate incarceration rate'' means 
        the percentage of minority individuals incarcerated for a 
        marijuana related offense in a State is higher than the 
        percentage of the non-minority individual population of the 
        State, as determined by the most recent census data;
            (4) the term ``low-income individual'' means an individual 
        whose taxable income (as defined in section 63 of the Internal 
        Revenue Code of 1986) is equal to or below the maximum dollar 
        amount for the 15 percent rate bracket applicable to the 
        individual under section 1 of the Internal Revenue Code of 
        1986;
            (5) the term ``marijuana'' has the meaning given the term 
        ``marihuana'' in section 102 of the Controlled Substances Act 
        (21 U.S.C. 802); and
            (6) the term ``minority individual'' means an individual 
        who is a member of a racial or ethnic minority group.
    (b) Ineligibility for Certain Funds.--
            (1) In general.--For any fiscal year beginning after the 
        date of enactment of this Act in which the Attorney General, 
        acting through the Director of the Bureau of Justice 
        Assistance, determines that a covered State has a 
        disproportionate arrest rate or a disproportionate 
        incarceration rate for marijuana offenses, the covered State--
                    (A) shall not be eligible to receive any Federal 
                funds for the construction or staffing of a prison or 
                jail; and
                    (B) shall be subject to not more than a 10-percent 
                reduction of the funds that would otherwise be 
                allocated for that fiscal year to the covered State 
                under subpart 1 of part E of title I of the Omnibus 
                Crime Control and Safe Streets Act of 1968 (42 U.S.C. 
                3750 et seq.), whether characterized as the Edward 
                Byrne Memorial State and Local Law Enforcement 
                Assistance Programs, the Local Government Law 
                Enforcement Block Grants Program, the Edward Byrne 
                Memorial Justice Assistance Grant Program, or 
                otherwise.
            (2) Funds for certain programming.--For purposes of 
        paragraph (1)(A), Federal funds for the construction or 
        staffing of a prison or jail shall not include Federal funds 
        used by a prison or jail to carry out recidivism reduction 
        programming or drug addiction treatment.
            (3) Reallocation.--Any amounts not awarded to a covered 
        State because of a determination under paragraph (1) shall be 
        deposited in the Community Reinvestment Fund established under 
        section 4.
    (c) Expungement of Marijuana Offense Convictions.--Each Federal 
court shall issue an order expunging each conviction for a marijuana 
use or possession offense entered by the court before the date of 
enactment of this Act.
    (d) Sentencing Review.--
            (1) In general.--For any individual who was sentenced to a 
        term of imprisonment for a Federal criminal offense involving 
        marijuana before the date of enactment of this Act and is still 
        serving such term of imprisonment, the court that imposed the 
        sentence, shall, on motion of the individual, the Director of 
        the Bureau of Prisons, the attorney for the Government, or the 
        court, conduct a sentencing hearing.
            (2) Potential reduced resentencing.--After a sentencing 
        hearing under paragraph (1), a court may impose a sentence on 
        the individual as if this Act, and the amendments made by this 
        Act, were in effect at the time the offense was committed.
    (e) Right of Action.--
            (1) In general.--An individual who is aggrieved by a 
        disproportionate arrest rate or a disproportionate 
        incarceration rate of a State may bring a civil action in an 
        appropriate district court of the United States.
            (2) Relief.--In a civil action brought under this 
        subsection in which the plaintiff prevails, the court shall--
                    (A) grant all necessary equitable and legal relief, 
                including declaratory relief; and
                    (B) issue an order requiring the Attorney General, 
                acting through the Director of the Bureau of Justice 
                Assistance, to--
                            (i) declare the State to be ineligible to 
                        receive any Federal funds for the construction 
                        or staffing of a prison or jail in accordance 
                        with subsection (b)(1)(A); and
                            (ii) reduce grant funding of the State in 
                        accordance with subsection (b)(1)(B).

SEC. 4. COMMUNITY REINVESTMENT FUND.

    (a) Establishment.--There is established in the Treasury of the 
United States a fund, to be known as the ``Community Reinvestment 
Fund'' (referred to in this section as the ``Fund'').
    (b) Deposits.--The Fund shall consist of--
            (1) any amounts not awarded to a covered State because of a 
        determination under section 3(b)(1); and
            (2) any amounts otherwise appropriated to the Fund.
    (c) Use of Fund Amounts.--Amounts in the Fund shall be available to 
the Secretary of Housing and Urban Development to establish a grant 
program to reinvest in communities most affected by the war on drugs, 
which shall include providing grants to impacted communities for 
programs such as--
            (1) job training;
            (2) reentry services;
            (3) expenses related to the expungement of convictions;
            (4) public libraries;
            (5) community centers;
            (6) programs and opportunities dedicated to youth;
            (7) the special purpose fund discussed below; and
            (8) health education programs.
    (d) Availability of Fund Amounts.--Amounts in the Fund shall be 
available without fiscal year limitation.
    (e) Authorization of Appropriations.--There are authorized to be 
appropriated to the Fund $500,000,000 for each of fiscal years 2018 
through 2040.
Marijuana Justice Act of 2017 This bill amends the Controlled Substances Act:   to remove marijuana and tetrahydrocannabinols from schedule I; and  to eliminate criminal penalties for an individual who imports, exports, manufactures, distributes, or possesses with intent to distribute marijuana.   It prohibits and reduces certain federal funds for a state without a statute legalizing marijuana, if the Bureau of Justice Assistance determines that such a state has a disproportionate arrest rate or disproportionate incarceration rate for marijuana offenses.  The bill directs federal courts to expunge convictions for marijuana use or possession. Finally, it establishes in the Treasury the Community Reinvestment Fund. Amounts in the fund may be used by the Department of Housing and Urban Development to establish a grant program to reinvest in communities most affected by the war on drugs. 
Marijuana Justice Act of 2017