The Partisan Ranger Act was passed on April 21, 1862 by the Confederate Congress. It was intended as a stimulus for recruitment of irregulars for service into the Confederate Army during the American Civil War.  
The Confederate leadership, like the Union leadership, later opposed the use of unconventional warfare out of fear the lack of discipline among rival guerrilla groups could spiral out of control. On February 17, 1864, the law was repealed after pressure from General Robert E. Lee and other Confederate regulars.

Only two partisan Ranger groups were exempt and allowed to continue to operate: Mosby's Raiders and McNeill's Rangers.

Background
Initially, Confederate President Jefferson Davis did not approve of unconventional warfare because it reduced the number of able men eligible to serve in the regular army. However, after conventional Confederate forces were driven out of western Virginia in the summer and early fall of 1861, pro-Confederate unconventional combatants remained active in the region. Virginia Governor John Letcher issued a proclamation calling to "raise such a force as would enable General Floyd to recover Western Virginia from the invaders." On March 27, 1862, Virginia Legislature passed an Act to Authorize the Organization of ten or more Companies of Rangers, known as the Virginia Ranger Act. 

On April 8, 1862, a bill was introduced to the 1st Confederate States Congress by a member of the Confederate Congress from Virginia to allow raising a force of partisan Rangers with a five dollar bounty for every dead federal. The Confederate Senate Congressional Military Committee removed the bounty provision, and proposed permitting future partisan Rangers to receive the same pay as regular Confederate soldiers on conditions they were subject to Confederate States Army regulations. In one exception, partisan Rangers were authorised to sell captured arms and munitions to Confederate Quartermaster-General's Department. 

The Confederate Congress passed the Partisan Ranger Act on April 21, 1862.

Content
There were two purposes of the Partisan Ranger Act. One was control of unconventional warfare forces and employ them for the Confederate States advantage. The other purpose was to promote the use of unconventional warfare in areas outside the reach for the Confederate Army.

According to Document 94 of the Congress of the Confederate States, the Partisan Ranger Act reads as follows:

Section 1.  The congress of the Confederate States of America do enact, the president be, and he is hereby authorized to commission such officers as he may deem proper with authority to form bands of Partisan rangers, in companies, battalions, or regiments, to be composed of such members as the President may approve for the purposes of unconventional warfare.

Section 2.  Be it further enacted, such partisan Rangers, after regularly received in the service, shall be entitled to the same pay, rations, and quarters during the term of service, and subject to the same regulations as other soldiers.

Section 3.  Be it further enacted, for any arms and munitions of war captured from the enemy by any body of partisan Rangers and delivered to any quartermaster at such place or places may be designated by a commanding general, the Rangers shall be paid their full value in such manner as the Secretary of War may prescribe.

The Partisan Ranger Act led to the recruitment of unconventional soldiers into the Confederate Army. Partisan Rangers had the same rules, supplies, and pay as the regular soldiers of the army, but they would be acting independently, detached from the rest of the army. The partisan Rangers were to gather intelligence and take supplies from the federals. Anything they brought back would be given to the quartermaster, a military officer in charge of providing food, clothing, and other necessities; in return, they would get paid.

The Partisan Ranger Act drew many Southern men who were reluctant to serve in a regular army. but were eager to enroll in a partisan corps with the same pay as conventional soldiers. The unintended consequences of the Partisan Ranger Act were beliefs all forms of unconventional warfare were approved, including violence toward civilians.

Outcome
The Partisan Ranger Act was repealed on February 17, 1864, after Robert E. Lee persuaded Confederate politicians to focus on more conventional means of warfare. This did not mean the end of unconventional warfare, but it meant the end of the Confederate government trying it out as an effective military strategy.

Legacy
The Partisan Ranger Act may have failed in the end, but it played a certain role in the American Civil War. Multiple partisan rangers groups and units proved to be useful in staging independent raids and collecting information about movements of the Union Army, as well as conducting reconnaissance and skirmishes during the battles. Altogether, the partisan rangers were able to somewhat distract and hamper the Union Army operations throughout the war until it developed somewhat successful counter-strategies late in 1864.

References

Further reading
 Johnson, Adam Rankin, and William J. Davis. The Partisan Rangers of the Confederate States Army. Louisville, Ky.: G. G. Fetter Company, 1904.
 Raiford, Neil Hunter. "The 4th North Carolina Cavalry in the Civil War." McFarland & Company, 2003, p. 5. 
 Mackey, Robert R. "The UnCivil War:  Irregular Warfare in the Upper South, 1861-1865." University of Oklahoma Press, 2004. .
Inc Ebrary. "Modern Insurgencies and Counter-Insurgencies: Guerrillas and their Opponents Since 1750". Routledge (UK), 2001. 
McKnight, Brian D., and Barton A. Myers, eds. "The Guerrilla Hunters: Irregular Conflicts During the Civil War," 2017.

1862 in American law
1862 in the Confederate States of America
1st Confederate States Congress
Law of the Confederate States of America
Irregular forces of the American Civil War
Raids of the American Civil War
April 1862 events