Hernandez is expected to appear before the court next Tuesday following a summoned presented to him by the court.
The left-back will have 10 days from October 19 to enter prison "voluntarily".
Though persons sentenced to less than two years in Spain do not usually go to prison, but with Hernandez's case, he's been ordered to go to prison due to a repetition of action.
It is reported that, Hernandez was arrested four years ago when he violated a court order that banned him from contacting his partner after a violent altercation between the two.
Having arrived in Madrid with his wife after getting married, Hernandez was sentenced to six months in prison in December 2019, a punishment for breaching the court's restraining order.
The 2018 World Cup winner was initially arrested in February 2017 when his then-girlfriend visited the hospital with minor injuries in a fight between them.
Apart from being sentenced to 31 days of community service, the court also orderd them not to see each other for six months.
Four months later Hernandez was arrested at the Madrid airport for being in the company of his partner.
But Hernandez's wife was not arrested because she had not received a formal restraining order from the court.
Aside being a key assest for France during their 2018 World Cup truimph, Hernandez was in the France squad that recently won the UEFA Nations League title, defeating Spain 2-1 in the final.