This question asked by Petros, a reader of this website, is really difficult to answer since there is not even an agreement as to when Freemasonry started and who started it.
Unlike Freemasonry however, the Order of the Temple, or the Knights Templar has very clear origins:
After the First Crusade captured Jerusalem in 1099, many Christian pilgrims traveled to visit what they referred to as the Holy Places. However, though the city of Jerusalem was under relatively secure control, the rest of the Outremer was not. Bandits abounded, and pilgrims were routinely slaughtered, sometimes by the hundreds, as they attempted to make the journey from the coastline at Jaffa into the Holy Land.
Around 1119, two veterans of the First Crusade, the French knight Hugues de Payens and his relative Godfrey de Saint-Omer, proposed the creation of a monastic order for the protection of these pilgrims. King Baldwin II of Jerusalem agreed to their request, and gave them space for a headquarters on the Temple Mount, in the captured Al Aqsa Mosque. The Temple Mount had a mystique, because it was located above what was believed to be the ruins of the Temple of Solomon. The Crusaders therefore referred to the Al Aqsa Mosque as Solomon's Temple, and it was from this location that the Order took the name of Poor Knights of Christ and the Temple of Solomon, or "Templar" knights. The Order, with about nine knights, had few financial resources and relied on donations to survive. Their emblem was of two knights riding on a single horse, emphasizing the Order's poverty.