To clarify your doubt, consider the following example using the standard definition of the boxplot.
Suppose we have the following observations $x = (-40,0, 2, 3, 4,10, 40)$. The median is 3, the first quartile is $Q_1 = 1$, and the third quartile is $Q_3 = 7$, thus $\text{IQR} = 8$. Let $u = Q_3+1.5\times \text{IQR} =16$ and $l = Q_1-1.5\times \text{IQR}=-8$.
The upper whisker would then be
$$\max_{x_i\leq u} x,$$
which equals 10. The lower whisker would be
$$\min_{x_i\geq l} x,$$
which equals 0.
Therefore, observations -40 and 40 fall outside the whiskers, and are thus "outlying" observations.
The conclusion is thus: the maximum and the minimum observed values may or may not correspond to the whiskers, depending on the distribution of observations.
Note: There are many ways to compute sample quantiles. In this example, I calculated them in R
by the quantile
function and using the default method.