Due to Bjorn Poonen.

Lemma 29.41.8. A universally closed morphism of schemes is quasi-compact.

Proof. Let $f : X \to S$ be a morphism. Assume that $f$ is not quasi-compact. Our goal is to show that $f$ is not universally closed. By Schemes, Lemma 26.19.2 there exists an affine open $V \subset S$ such that $f^{-1}(V)$ is not quasi-compact. To achieve our goal it suffices to show that $f^{-1}(V) \to V$ is not universally closed, hence we may assume that $S = \mathop{\mathrm{Spec}}(A)$ for some ring $A$.

Write $X = \bigcup _{i \in I} X_ i$ where the $X_ i$ are affine open subschemes of $X$. Let $T = \mathop{\mathrm{Spec}}(A[y_ i ; i \in I])$. Let $T_ i = D(y_ i) \subset T$. Let $Z$ be the closed set $(X \times _ S T) - \bigcup _{i \in I} (X_ i \times _ S T_ i)$. It suffices to prove that the image $f_ T(Z)$ of $Z$ under $f_ T : X \times _ S T \to T$ is not closed.

There exists a point $s \in S$ such that there is no neighborhood $U$ of $s$ in $S$ such that $X_ U$ is quasi-compact. Otherwise we could cover $S$ with finitely many such $U$ and Schemes, Lemma 26.19.2 would imply $f$ quasi-compact. Fix such an $s \in S$.

First we check that $f_ T(Z_ s) \ne T_ s$. Let $t \in T$ be the point lying over $s$ with $\kappa (t) = \kappa (s)$ such that $y_ i = 1$ in $\kappa (t)$ for all $i$. Then $t \in T_ i$ for all $i$, and the fiber of $Z_ s \to T_ s$ above $t$ is isomorphic to $(X - \bigcup _{i \in I} X_ i)_ s$, which is empty. Thus $t \in T_ s - f_ T(Z_ s)$.

Assume $f_ T(Z)$ is closed in $T$. Then there exists an element $g \in A[y_ i; i \in I]$ with $f_ T(Z) \subset V(g)$ but $t \not\in V(g)$. Hence the image of $g$ in $\kappa (t)$ is nonzero. In particular some coefficient of $g$ has nonzero image in $\kappa (s)$. Hence this coefficient is invertible on some neighborhood $U$ of $s$. Let $J$ be the finite set of $j \in I$ such that $y_ j$ appears in $g$. Since $X_ U$ is not quasi-compact, we may choose a point $x \in X - \bigcup _{j \in J} X_ j$ lying above some $u \in U$. Since $g$ has a coefficient that is invertible on $U$, we can find a point $t' \in T$ lying above $u$ such that $t' \not\in V(g)$ and $t' \in V(y_ i)$ for all $i \notin J$. This is true because $V(y_ i; i \in I, i \not\in J) = \mathop{\mathrm{Spec}}(A[t_ j; j\in J])$ and the set of points of this scheme lying over $u$ is bijective with $\mathop{\mathrm{Spec}}(\kappa (u)[t_ j; j \in J])$. In other words $t' \notin T_ i$ for each $i \notin J$. By Schemes, Lemma 26.17.5 we can find a point $z$ of $X \times _ S T$ mapping to $x \in X$ and to $t' \in T$. Since $x \not\in X_ j$ for $j \in J$ and $t' \not\in T_ i$ for $i \in I \setminus J$ we see that $z \in Z$. On the other hand $f_ T(z) = t' \not\in V(g)$ which contradicts $f_ T(Z) \subset V(g)$. Thus the assumption “$f_ T(Z)$ closed” is wrong and we conclude indeed that $f_ T$ is not closed, as desired. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).