The two officers were taken to hospital with one nursing a broken finger and the other needing treatment after being hit in the face with the pepper spray, according to the local Ouest-France newspaper.
The officers arrived at the property located on the île de Nantes shortly after 3pm on Wednesday afternoon. The police unit had been despatched to the building to intervene in a neighbourly dispute.
As they knocked on the door of the apartment located on the ground floor they were met by the 8-year-old and his mother. From behind his mother's back, the young assailant struck out at the officers with the hammer and the pepper spray.
After the injured police officers were taken away for treatment, the young boy and his mother were taken to the police station for questioning.
The pair were later allowed to return home.
"Given his young age, the boy can't be held criminally responsible for his actions," said a police officer, according to the newspaper.