UPDATE: Two men were found clinging to their boat after it overturned north-west of Hillarys this morning.
The RAC Rescue helicopter was sent to help the Australian Maritime Safety Authority search for an EPIRB that was activated near Ocean Reef about 11am, the Department of Fire and Emergency Services said.
A helicopter found the men holding on to the upturned hull of the boat about five nautical miles north-west of Hillarys Boat Harbour.
An AMSA spokesperson said the authority's Rescue Co-ordination Centre co-ordinated the rescue operation.
"RCC Australia tasked a Department of Fisheries WA vessel in the area to head to the location as well as two local Volunteer Marine Rescue vessels," the spokesperson said.
"The Department of Fisheries vessel reached the men first and brought them to safety."
The men were rescued about 11.40am.
The men were transferred to a Volunteer Marine Rescue vessel and taken to shore for a medical assessment.
St John Ambulance was called to attend, but The West Australian has been told the men were fine.
Police said the men's boat was towed to Ocean Reef Marina.
AMSA reached an emergency contact for the men after the distress beacon was set off.
It urged distress beacon owners to make sure their beacon was registered.
"Beacon registration is free and can be done online at beacons.amsa.gov.au or by phoning AMSA on 1800 406 406," the AMSA spokesperson said.
"Having a registered beacon means AMSA can contact you or a nominated emergency contact if your distress beacon is activated.
"This helps AMSA get help to you as soon as possible."