Oil prices remained near their lowest in more than a decade.
WTI crude oil futures settled up 4 cents, or 0.13 percent, at $30.48 a barrel. WTI briefly fell below the psychologically key $30 level Tuesday and hit a fresh 12-year low.
Brent briefly fell below $30 a barrel in intraday trade Wednesday and settled at $30.31 a barrel, the first close below U.S. crude since Dec. 30, 2015.
"There's basically no buying, which is part of the problem," said Jeremy Klein, chief market strategist at FBN Securities.
"You're going to need some buyers to come in. Earnings is going to be an opportunity to do that," he said, also noting some volatility ahead of options expiration on Friday.
Read MoreFANG stumble bad omen for market?: Free preview
"The fear of a slowing economy is taking over," said Adam Sarhan, CEO of Sarhan Capital.
"The fact that we erased gains and can't rally from deeply oversold conditions tells you everything you need to know about this market," he said.
The Nasdaq composite underperformed, closing down 3.4 percent, as Amazon fell 5.8 percent and the iShares Nasdaq Biotechnology ETF (IBB) lost 5.4 percent. Apple turned lower to close nearly 2.6 percent lower.
Netflix closed down almost 8.6 percent. Netflix and Amazon both more than doubled in 2015 as the top performers in the S&P 500.
Some traders also said a factor behind the declines in stocks was news that brewing giant AB InBev has launched a $46 billion seven-tranche bond, the second biggest corporate bond on record, market sources told IFR on Wednesday.
"I think it's just wait and see now until the bank earnings come in," said Marc Chaikin, CEO of Chaikin Analytics.
"The mood is pretty sour on Wall Street. I think people are using rallies as opportunities to raise cash," he said, noting resistance in the S&P 500 at 1,950.
JPMorgan Chase earnings are expected Thursday before the opening bell.
Energy fell 1.78 percent after initially attempting to trade higher. Oil gave up earlier gains of more than 3 percent after weekly U.S. crude inventory data showed a build of 234,000 barrels and a rise of 8.4 million barrels of gasoline, according to Dow Jones.
The iShares MSCI Emerging Markets ETF (EEM) closed down 1.05 percent after earlier trying for gains.
"I think the EEM is a good proxy for stability outside the U.S. and threat to growth," said Ilya Feygin, managing director and senior strategist at WallachBeth Capital.
The market is going to "focus on oil, China, and is there a threat to global growth?" he said.
European stocks pared gains to end mixed. U.S. stocks opened higher Wednesday, helped by recovery in oil prices and Chinese data overnight.
China's crude oil imports hit a record high in December, while copper imports were the second highest on record, according to customs data.
Overall Chinese exports and imports fell by less than expected in December, leaving a trade surplus of over $60 billion for the month, the data showed. The economy likely had its weakest annual growth in 25 years. China GDP data is expected next week.
The Chinese yuan held steady for a fourth-straight day, with the People's Bank of China setting the yuan midpoint fix against the U.S. dollar at 6.5630, compared to yesterday's fix of 6.5628.
Read MoreChina opens new front in war on yuan speculators
"Just more stability coming out of the Far East. Some stability coming into the yuan," said Mark Luschini, chief investment strategist at Janney Montgomery Scott.
"We had a rebound yesterday that was decent. Some of the market internals weren't strong," Luschini said. "The question will be, can it carry through (Wednesday)?"
Devaluation in the yuan against the dollar last week and speculation of significant weakening in the currency weighed heavily on U.S. stocks last week.