The ambush happened while 27-year-old Javier Colorado was cycling through the highly volatile southwestern province of Baluchistan, officials said.
The cyclist from Madrid and his escort of local tribal police were ambushed in Mastung district, some 55 kilometres (35 miles) west of the provincial capital Quetta.
Baluchistan, which borders Iran and Afghanistan, is one of Pakistan's most unstable provinces, rife with separatist and Islamist militants and plagued by sectarian bloodshed.
Kidnappings for ransom are common in parts of the province and Western hostages could be expected to fetch a high price.
"The local tribal police officials were escorting the Spanish cyclist after he entered Pakistan from Iran when gunmen attacked him," a senior local administration official, Shafqat Sehwani, told news agency AFP.
Six police officers were killed and five wounded in an exchange of fire, he said, adding that Colorado suffered only minor injuries.
A senior local administration official, Akbar Baluch, confirmed the incident in which one of the attackers was also killed.
Colorado left Madrid in October 1st and is currently on a two-year 'solo' journey around the world.
Despite the attack in Pakistan, the Spaniard — a regular marathon runner — plans to continue his trip by flying to Lahore near the Indian border, family was reported as saying in Spain's El Mundo newspaper on Wednesday.
Wednesday's attack took place near the scene of a bomb attack on a bus that killed 24 Shiite pilgrims who were returning from Iran on Tuesday.
Separately, police on Tuesday evening found the body of a Shiite Muslim close to the Iran border two days after he was abducted, the top local administration's official doctor Akbar Harifal told news agency AFP.
Baluchistan has been badly hit by a decade-long Baluch separatist insurgency and sectarian violence, mainly targeting Shiite Muslims from the Hazara ethnic community.
Two huge bomb attacks targeting Shiite Hazaras in Quetta in January and February last year killed nearly 200 people.