Left-arm tweaker O'Keefe dismissed top-scorer KL Rahul, Ajinkya Rahane and Wriddhiman Saha in the 33rd over before Lyon stepped up to remove counterpart Ashwin.
Peter Handscomb clutched a couple of remarkable catches amid the chaos, which followed a double-wicket maiden from Mitchell Starc in the morning session.
O'Keefe later accounted for Jadeja, Jayant Yadav and Umesh Yadav with ease.
Starc swung momentum Australia's way by dismissing Virat Kohli for a second-ball duck.
Starc sizzled in his second spell, removing Cheteshwar Pujara and Kohli in the space of three balls.
The left-armer's double-wicket maiden came after he slapped 61 runs from 63 deliveries, lifting the tourists to a total of 260.
- AAP