So the American Civil War didn’t have mercenary participants, but wouldn’t the deserters who fought against either the north or south technically be mercenaries of sorts? They weren’t technically Union soldiers right? Granted the movie Free State of Jones isn’t the best source of information (or so I’ve heard, and based off reviews) but the movie showed them as somewhat independent of the Union army, and other sources I’ve found seem to put them in their own place.
Usually the book is better than the movie, and historian Victoria Bynum's book "The Free State of Jones" is a good source for the question you're asking. The deserters in Jones County, Mississippi led by Newt Knight are best understood as Unionist guerillas.
To distinguish between a guerilla and a mercenary: typically a mercenary is a paid professional combatant unaffiliated with the warring sides and operating outside of the normal command structure. A guerilla is member of a small irregular band outside of the normal military organization, focused on asymmetric tactics and usually supported clandestinely by the civilian population. Guerillas are not officially enlisted soldiers and are not typically paid, though a warring side may give them arms, money, and other supplies when they can. Knight's men weren't ever paid by the Union (more below on their attempts to get supplies from the North), and they were explicitly fighting to oppose the Confederacy and restore the pre-1861 Union which they had been citizens of, so I don't think they can be called mercenaries.
Knight was a soldier in Company F of the 7th Mississippi Infantry Battalion when he deserted the Confederate Army in 1862. Most of his fellow Jones County guerillas came from this same company. In the Civil War, infantry companies were organized locally, so the men in Company F would have been neighbors from a similar socio-economic background. Jones county had the lowest rate of slave-ownership in Mississippi in 1860, so these relatively poorer farmers had less of a stake in slavery as an economic system. Many people in this region were pro-Unionist and Jones County sent a pro-Union delegate to the state secession convention in 1861. After Confederate conscription laws came into force, any white man under 45 could be forced to join the army. However, a slaveholder who owned more than 20 slaves was exempt, which Knight later said disturbed him and partly motivated his desertion, as the conflict had become "a rich man's war and a poor man's fight".
Many soldiers in the Confederate Army went AWOL at different times, but generally the policy was lenient toward them if they returned willingly. By 1863, the number of deserters had created a manpower problem, and the Confederate Army used force to remove them from their homes and force them back into service. Escalating efforts to collect these deserters led to conflict with Knight's band in 1863, and his group is believed to have shot dead Major Amos McLemore who was sent by General Braxton Bragg to collect deserters in the Jones County area. This was the first shot in a series of skirmishes between Knight's group and the Confederate Army. The deserters hid in the woods (prior to commercial logging in the late 19th century this region was mostly covered in dense pine forest) and swamps. Local supporters, notably women and slaves, brought them food and supplies. In addition to fighting army troops, Knight's men also attacked government tax collectors, causing enough disruption to essentially disable Confederate civil government in the area.
Far from the front lines, Knight sent messengers to connect with the Union forces at Vicksburg, New Orleans, and Memphis to obtain reinforcements, arms, or other supplies, but these efforts were not successful and any shipments sent to him were intercepted. He was never paid or supplied by the Union Army, however, at least some of his men escaped to New Orleans where they joined a Union Army regiment, the 1st Regiment New Orleans Infantry.
The reference for all of this is: Bynum, Victoria E. (2003), The Free State of Jones: Mississippi's Longest Civil War