I was confused about the following deduction. Let $M$ be a compact manifold and $f: M \to \mathbb R$ be a Morse function. Let $\mathbb k$ be a fixed field. We have \begin{equation} H^*(M, f^{-1}((-\infty, t]); \mathbb k) = H^*(f^{-1}([t, \infty)), f^{-1}(\{t\}); \mathbb k) = H_{n-*}(f^{-1}([t, \infty)); \mathbb k). \end{equation} The first equality comes from excision theorem and the second comes from Lefschetz duality.
If $t = \max_Mf$, then $f^{-1}((-\infty, t]) = M$ and $f^{-1}([t, \infty))= pt$ (assuming maximum point is unique). Then \begin{equation} H^*(M, f^{-1}((-\infty, t]); \mathbb k) = H^*(M, M; \mathbb k) =0 \end{equation} but \begin{equation} H_{n-*}(f^{-1}([t, \infty)); \mathbb k) = H_{n-*}(pt, \mathbb k) \neq 0 \end{equation} This contradicts to the deduction above.
The second "equality" from Lefschetz doesn't exist, because although $\lbrace t\rbrace$ is the boundary of $[t,\infty)$, the level set $f^{-1}(t)$ need not be the boundary of $f^{-1}([t,\infty))$, and actually $f^{-1}([t,\infty))$ need not have boundary. Take for instance the "height" function $S^2\to\mathbb{R}$ sending the south pole to $0$ and the north pole to $1$. Then $f^{-1}(0)=\lbrace\text{south pole}\rbrace$ while $f^{-1}([0,\infty))=S^2$ which has no boundary.