The word is commonly but inaccurately spelled forego, but those are really two separate and unrelated verbs. The fore in forego means first or before, so that a foregone conclusion is a conclusion that comes before any argument or declaration, since none is necessary. That prefix fore is related to all kinds of words in English that have to do with priority in time or position; the ones beginning with f come from the German stock (first, forward), while those beginning with p typically come from the Latin stock, either borrowed directly or imported through French (prime, primrose = first rose of spring, prior, pristine = in its ancient original condition, not necessarily clean; prince = the first citizen, head of state).
But the prefix for in forgo is the same as the much more common ver in German, and often implies something done inside out, or something done to its bitter end, as in its Latin cognate per- ; something perfect has literally been done to its completion; but someone perfidus has taken his trustiness and twisted it into mendacity. In English the prefix survives in forswear, which means to swear off, as in forswear thy foolish ways, or to swear falsely, as in the villain is forsworn. It also survives in forget, which means that you dont get it; forspent, which means youve spent it all, drat it; and forlorn, cf. German verloren, Our word was the old past participle of the Old English verb forleosan, to lose, with the medial s turning to r by a process known as rorification, which is the process by which something turns into an r (even philologists have their jests); and in a couple of other words, including forgo.