Beer is related to whisky the same way that wine is related to brandy.
If grains are fermented to produce a low-alcohol beverage, it is beer.
If grains are fermented and the resulting product (which is not meant to taste good for drinking) is distilled, and the high-alcohol distilate is aged in oak barrels that have been burnt inside, the result is whisky.
(If one cares only about the alcohol content and so doesn't bother to age it, the product is "moonshine" or "white lightning".)
If fruit is used rather than grain and the barrels are not burnt, the corresponding products are wine and brandy.