Sleipnir was the eight-legged horse born of Loki, and belonged to Odin. Loki gave birth to Sleipnir after turning himself into a female horse when his father demanded he sabotage the work of a craftsman from being able to complete the fortification of Asgard in one season.
In the early days of Valhalla, a craftsman came to visit. He offered to create a citadel around Asgard which could keep out the giants who may attack from any direction. The man claimed he could complete the fortification of Asgard in three seasons, and for payment demanded that the goddess Freyja be his bride and that he receives the sun and the moon also. The gods however thought his choice of payment was steep and negotiated that he would be paid in full, if he completed the wall in just one season and that he receives no help from any man. The man accepted this with the condition that his stallion, Svadilfari, could help. The gods were unsure, but Loki convinced them that even with the help of his horse, the man would not be able to uphold his end of the bargain, so Freyja, and the sun and moon were not at risk at all.
And so the man set to work on the first day of winter, yet it was his huge stallion that did all the work, effortlessly hauling huge boulders. The progress of the citadel progressed swiftly, and it was so tall and strong that no enemy would be able to take Asgard. Three days before the winter was over the gods sat down for counsel and discussed how they could avoid giving the man payment. Whilst discussing this the gods began to question who had agreed to the man’s terms in the first place. The consensus was that Loki was to blame. The evil Loki was demanded to obstruct the craftsman from completing the last part of the citadel so that they would not need to pay him. Loki would face violence and death if not, so he swore oath that he would stop the man and his horse from completing the citadel.