The Curry County Sheriff's Office says Deputy Terry Brown swam into the ocean at Harris Beach to help the boy after he became stuck in a rip current.
Deputies say Brown hung on to the boy for about 45 minutes in the water to keep his head from going under.
By the time rescue crews arrived and were able to bring the two to shore, both were suffering from hypothermia. Brown was taken to the hospital in critical condition, while the boy arrived later in stable condition. Sheriff John Bishop says both are expected to make full recoveries.
Brown has been a Curry County deputy for about a year. He has been in law enforcement about ten years.