The convicts - Usman, 47, and Shehu, 33 - who reside at Mabushi area of Abuja, were found guilty of a two-count charge of a joint act and attempting to steal a car.
The judge, Alhaji Ahmed Ado, who handed down the verdict, however, gave each of the convicts an option of N12,000 fine.
Ado warned them to desist from committing crimes, adding that the sentence would also serve as a deterrent to others.
Earlier, Police Prosecutor Florence Auhioboh told the court that the accused committed the offences on April 6 at Eda Plaza, opposite Chida Hotel, Utako, Abuja.
The two men were trying to break into the vehicle, but were sighted by passers-by, who arrested them and took them to Utako Police Station.
The offences contravened Sections 79 and 95 of the Penal Code, Laws of the Federation.