By the time this specific scene took place, New York City had devolved into absolute anarchy over a four-day period (July 13–16, 1863).
The Spark (The Draft): The U.S. government had just instituted the Civil War military draft. Working-class citizens—largely white, poor, and heavily Irish-immigrant—were furious because wealthy men could completely avoid the draft by paying a $300 "commutation fee". The poor felt they were being forced to fight a "rich man's war".
The Escalation (Racial and Political Violence): The protest rapidly transformed into a horrific wave of violence. Rioters targeted government buildings, abolitionist homes, and newspaper offices (like the New York Tribune) that supported the war. Tragically, it also turned into a massive race riot. Rioters brutally targeted the city's Black population, lynching citizens in the streets and burning down the Colored Orphan Asylum, out of fear that emancipated enslaved people would migrate north and compete for their low-wage jobs.
The Government's Response: The local police were completely outnumbered and unable to stop the destruction. To regain control of the city, the federal government had to rush combat troops directly from the battlefields of Gettysburg straight to Manhattan.
What you are seeing in this image is the Union Army using lethal, battlefield force to finally suppress the insurrection and clear the streets of New York by order of military command.