The Sensex initially fell 0.2 percent before recovering to trade slightly higher.
The Nifty 50, which had gained 0.07 percent in early trade, later erased its gains to trade in the red.
Wall Street rally boosts global sentiment
Overnight, Wall Street closed sharply higher, led by a strong rally in Microsoft shares, which surged 16 percent after the company's Azure cloud business reported stronger-than-expected growth.
Asian markets reflect positive momentum
The optimism from Wall Street was also seen across Asian markets, where investor sentiment remained buoyant following Microsoft's upbeat earnings and the broader technology-led rally.