Somdev, who struggled to go deep in the main draws on the ATP tour in 2015, got the better of Ward 2-6 7-5 6-4 in a two hours and three-minute battle.
Ranked 177th, Somdev clawed his way back in the match after losing the first set, gathering strength and changing the tactics.
They were neck-and-neck in the second set before Somdev capitalised on a break of serve and never looked back. He raced to a 4-1 lead in the deciding third set and closed the match in his favour comfortably.
Later in the day, Saketh Myneni was also ousted from the qualifying event
Also Read
, losing his second round match 4-6 2-6 to fifth seed Thomas Fabbiano.
Despite now having two platers im singles main draw, India's best hopes are in doubles with experienced Leander Paes, Rohan Bopanna and Mahesh Bhupathi, who is returning to Tour after a break, in the mix.
In bottom half of the draw, Ramkumar has a tough task to go past Spanish journeyman Daniel Gimeno-Traver (ranked 98) and if he manages to cross the first hurdle he will be up against second seed and world number 12 Kevin Anderson.
Jack Sock, the American 26th seed, reached the fourth
round for the first time by knocking out 2014 champion Marin Cilic 6-4, 6-3, 6-3 in tie where he did not face a single break point.
The 23-year-old Sock, whose last two appearances at the US Open had ended in retirements, goes on to face French ninth seed Jo-Wilfried Tsonga.
Tsonga, a two-time quarter-finalist, made the last 16 with a 6-3, 6-4, 7-6 (7/4) victory over South Africa's Kevin Anderson.
Roberta Vinci, the Italian seventh seed and runner-up to compatriot Flavia Pennetta in 2015, overcame a second set blip to defeat 21-year-old Carina Witthoeft 6-0, 5-7, 6-3.
The 33-year-old Vinci led 5-4, 30-0 in the second set before her 84th-ranked German opponent dug deep to take the tie into a decider.
But Vinci prevailed on the back of 40 winners and will meet Lesia Tsurenko of the Ukraine for a quarter-final place.
Latvia's Anastasija Sevastova backed up her shock victory over third seed and French Open champion Garbine Muguruza by making the last 16 for the first time with a 6-4, 6-1 win over Kateryna Bondarenko of the Ukraine.
World number 48 Sevastova, who briefly retired in 2013, has matched her best run at a Slam and next faces British 13th seed Johanna Konta who put out Belinda Bencic 6-2, 6-1.