The Civil Rights Act of 1866 was a reaction to President Johnson’s attempt to end reconstruction by pardoning all the former southern slave owners. At that time, slavery was almost restored under vagrancy and apprenticeship laws. The Civil Rights bill was an attempt to support the Proclamation of Independence, by which the republicans pledged to defend the rights of freed slaves to be American citizens.
The act declared that all people born in the US were declared citizens of the US, which implied the provision of protection by law and the right to own property. Thus, this act was necessary to avoid letting President Johnson reestablish slavery in the South.