The shooting happened Tuesday when the deputy was riding his bike down Friant Road.
He was shot in the back with an air rifle
26-year-old Larry-Dean McLaughlin and 23-year-old Christopher Touchstone were just interviewed by detectives.
The sheriff says a caller tipped them off that one of the men had bought a ticket out of state. Both suspects have criminal histories.
"The suspects were driving down the road, it appears they did this on a dare or just for fun, they wanted to shoot someone while traveling down that road way," Fresno County Sheriff Margaret Mims said.
The deputy is still recovering. The sheriff says she wants to stress the importance of carrying a cell phone and also remembering to ride with a friend.