He is awaiting deportation, the local police were quoted as saying Friday by news portal The Thaiger.
His arrest came as part of a police campaign to crack down on visitors overstaying their visa.
Last month police on resort island Phuket had arrested four Nigerian men who had been staying illegally for three to four years.
Overstaying for 90 days or more entails deportation and a ban on entering the country again.
Thailand received 11 million foreign visitors last year, making its tourism industry among the fastest to recover in Southeast Asia following the pandemic.
The government eyes 30 million arrivals this year.