The order signed by U.S. District Judge Weston Houck requires Attorney General Henry McMaster "to refrain from initiating or pursuing any prosecution against Craigslist or its officers" in connection with content posted on the site.
McMaster and Craigslist agreed to the judge's order.
Earlier this week, CEO Jim Buckmaster filed a federal lawsuit against the prosecutor after McMaster threatened to go after the Internet advertising company for allegedly aiding and abetting prostitution if the site leads to a prostitution case in South Carolina.
In his filing, Buckmaster claimed McMaster's threat violates the constitutional rights of company executives.
On May 5, the attorney general called on Buckmaster to remove ads related to prostitution and pornography from its South Carolina sites, giving the San Francisco-based company 10 days to comply or face possible charges.
Craigslist subsequently pledged to eliminate its "erotic services" category and screen submissions to a new "adult services" section before posting them.
When the deadline expired May 15, McMaster said he still intended to charge Craigslist executives with aiding and abetting prostitution if an ad on the Web site leads to a prostitution case in South Carolina.
McMaster has said his office has continued to investigate the ads in the new "adult services" section, but no charges have been brought. After demanding an apology from McMaster for targeting his company, Buckmaster sued the prosecutor.
But McMaster insists he has gone after Craigslist at the behest of local law officers who say it's the No. 1 marketplace for adverting sex services.
"It is the vehicle of choice for prostitution in this country, and they had been notified emphatically that those were prostitution ads," McMaster told The AP on Thursday.
On Friday, McMaster spokesman Mark Plowden called Houck's order standard for such cases.
"This is a very routine legal procedure that allows the parties time to prepare for a hearing," he said.
No hearing dates have been set. A spokeswoman for Craigslist did not immediately return a message seeking comment.
On Thursday, McMaster told The Associated Press he has never handled a single such case in more than six years as the state's top prosecutor.
"I don't think this office has handled any prostitution prosecutions ever," said McMaster, who was first elected in 2002. "Now this is something different. This is against the biggest want ads Web site in the world."
On Wednesday, seven people were indicted for allegedlyon Craigslist, New York State Attorney General Andrew Cuomo announced.
Room Service Entertainment, headquartered in Queens, N.Y. and advertised in the "Erotic Services" section of the popular online classified site, was an illicit prostitution operation that used codes to arrange transactions, Cuomo's office said.