The state-run Saudi Press Agency identified the men as soldiers working in the Defense Ministry, AP reported.
It did not elaborate on how the men aided the kingdom's enemies. Saudi Arabia has launched an aggression against Yemen since 2015.
The kingdom said the three men were convicted in court and a later royal order served as a death warrant.
Saudi Arabia put to death 184 people in 2019.