In analyzing poetry, it is important to take apart the pieces of metaphor and symbolism individually to figure out what they mean and what moods they evoke. It can also be important to learn a little bit about the author of a poem and what they typically write, as this information can create context for the poem's meaning. Terrance Hayes is a black American poet who often writes about his experience as a black man in America. This poem is no exception. The poem does not immediately give its racial themes away, especially without having read any of this poet's other work, but let's analyze.
The title is "American Sonnet for My Past and Future Assassin." Sonnets are a poetic form often used to contrast different ideas, characters, or beliefs. The title would lead us to believe that this is occurring as the speaker contrasts himself with his aggressor or assassin, but the answer is a little bit more complicated. Given that this poem is in many ways about blackness, you might think that the assassin/aggressor is white American, and while this is often implicitly true, in this poem it is not necessarily the case, or at least not directly.
I lock you in an American sonnet that is part prison,
Part panic closet, a little room in a house set aflame.
Immediately, the poem does not follow the approach we might expect. We have been led to believe by the title that the speaker is writing a sonnet for his aggressor, but in the first line, the speaker is the aggressor. The poem begins contrasting unlike but similar ideas, the first being a prison and a panic closet. Both are closed-off, claustrophobic spaces, but one is involuntary (a prison) and one is a panic closet (for safety from outside threats). The prison and the panic closet at both the little room in a house set aflame. Both are surrounded by danger and neither are really a full protection from fire (that isn't what panic closets are for) but instead serve as a metaphor for being disconnected from the outside world.
I lock you in a form that is part music box, part meat
Grinder to separate the song of the bird from the bone.
The second comparison is between a music box and a meat grinder, both of which are something you wind up with a similar twisting motion. One of these objects creates music and joy, while the other is used to process dead flesh. The speaker has combined them, however, indicating a desire to separate disparate elements (love and violence). Additionally, the concept of "the song of the bird" is a subtle reference to "Caged Bird," a poem the famous black American poet, Maya Angelou (https://www.poetryfoundation.org/poems/48989/caged-bird).
I lock your persona in a dream-inducing sleeper hold
While your better selves watch from the bleachers.
The speaker protects and imprisons his "assassin"—who we begin to understand is just a version of the narrator, an alternate self—embracing him in dreams, which are an escape from reality. This contrasts against "better selves," visionary ideals watching the game he plays with himself.
I make you both gym & crow here. As the crow
You undergo a beautiful catharsis trapped one night
In the shadows of the gym. As the gym, the feel of crow-
Shit dropping to your floors is not unlike the stars
Falling from the pep rally posters on your walls.
Use of the words "gym" and "crow" is a not-so-subtle reference to Jim Crow laws. The imagery of a bird is brought back with the crow. The crow's catharsis is beautiful for its understanding but not a joyous thing: The crow is once again constrained, this time by the gym, which is just another cage. The catharsis involves understanding that white America is unaffected by the crow or the speaker and its visionary ideals (pep rally stars) fall apart when applied to black Americans.
I make you a box of darkness with a bird in its heart.
Once again a bird is constrained in a box, but the use of the word "heart" indicates a kind of painful self-love in the act of self-protection.
Voltas of acoustics, instinct & metaphor. It is not enough
To love you. It is not enough to want you destroyed.
There is no amount of self protection or bird song that can change the reality of blackness in America. As we have realized by this point that the "you" the speaker is referring to (the assassin) is actually himself, we understand that this poem is talking about an inescapable cycle self-love and self-hatred that black Americans must exist in. Throughout the poem, the speaker loves and embraces himself while also fighting with himself. This doesn't mean the oppression is self-imposed, but instead that the very system the speaker and his assassin exist in is just a series of small and large boxes that are inescapable. The catharsis of cultural, racial self-love is not enough to fix the violence, and the oppositional self-hatred cannot ever really extinguish the self-love. This sonnet is a complicated dance contrasting the black American's embrace and destruction of the self, as necessitated and enforced by structural racism.