Abdullah bin Ma'qil (may Allah have mercy on him) said that Sayyiduna Ali (may Allah be pleased with him) said: "Wala' is a branch of slavery; whoever secures the wala' also secures the inheritance."
This is the correct version, and Mis'ar also narrated it thus from Imran. Its meaning is: whoever has the wala' has the inheritance by virtue of the wala'.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الولاء / 21504