I am not a SC lawyer, but I have actually represented inmates in divorce cases on a few occasions. The short answer is that like any other individual an inmate can contest a divorce. As for costs and fees, his status as an inmate is irrelevant.
Yes, any person can contest a lawsuit. Will the judge grant your divorce is the question? Make sure to consult a lawyer to make sure you have alleged the correct grounds for divorce in your petition. You will also have to properly serve him and will likely have to give him notice of the trial/hearing date. If you have pled the correct grounds for divorce the judge should approve your divorce.
A weekly guide with tips and legal advice for each stage of the process.