Born in Zacatecas City, Mexico, Ruiz grew up in Coachella, California. He was the first Latino to receive three graduate degrees from Harvard University, attending Harvard Medical School, the John F. Kennedy School of Government and Harvard School of Public Health. He worked as an emergency physician at the Eisenhower Medical Center in Rancho Mirage, California, before assisting humanitarian efforts in the aftermath of the 2010 Haiti earthquake. In what was considered a major upset, Ruiz defeated redistricted incumbent Republican U.S. Representative Mary Bono Mack in the 2012 election with a 52.9% to 47.1% margin. He was reelected to Congress in 2014 with 54.2% of the vote, after what was considered one of the most competitive congressional races in the country; in 2016 and 2018, he received about 60% of the vote.