The king's first visit to Lebanon since he took the throne last June follows a joint Spanish-Israeli probe into the death in January of Corporal Javier Soria Toledo, 36.
At the start of his two-day visit Felipe paid tribute to Soria and the 12 other Spanish serviceman killed over the years in Lebanon on peacekeeping duty.
"Spain's commitment to this (peacekeeping) aim is firm and decided," Felipe said in a speech in Beirut, according to a text in Spanish released by the palace.
"We will therefore continue to support the Lebanese armed forces through our participation in the United Nations Interim Force in Lebanon (UNIFIL)."
After meeting with Lebanon's Prime Minister Tammam Salam on Tuesday, Felipe on Wednesday visits Spanish soldiers deployed with UNIFIL in the southern district of Marjayoun.
Israel occupied parts of Lebanon for 22 years until 2000 and the two countries are still technically at war.
The 10,000-strong UN force now monitoring the border includes some 600 Spanish soldiers and troops from 35 other nations.
Israeli security sources acknowledged on Tuesday that it was Israeli fire that killed Soria on January 28.
They said the firing followed an attack on Israeli forces by the Shiite militia Hezbollah.
Lebanon "has suffered a lot in its recent history and Spain wishes it a future of peace and harmony", Felipe said.
"I hope that the spirit of harmony of Lebanese people willing to handle the rich and sometimes difficult mosaic of differences that makes up this country will always prevail."