[proofplan]
Let $\mathcal{U}$ be a nonprincipal $\kappa$-complete ultrafilter on $\kappa$ witnessing that $\kappa$ is measurable. We first prove directly that every bounded subset of $\kappa$ is $\mathcal{U}$-null, using only nonprincipality and $\kappa$-completeness. If $\operatorname{cf}(\kappa)<\kappa$, then $\kappa$ is the union of fewer than $\kappa$ many bounded initial segments. The bounded-null result and $\kappa$-completeness then force $\kappa$ itself to be $\mathcal{U}$-null, contradicting that every ultrafilter contains its underlying space.
[/proofplan]
[step:Choose a witnessing ultrafilter and record the null-set consequence of $\kappa$-completeness]
Since $\kappa$ is measurable, let $\mathcal{U}$ be a nonprincipal $\kappa$-complete ultrafilter on the set $\kappa$. Here $\kappa$ is identified with the set of all ordinals below $\kappa$.
For a subset $A \subset \kappa$, call $A$ $\mathcal{U}$-null if $A \notin \mathcal{U}$. We shall use the following consequence: if $\mu < \kappa$ and $(A_i)_{i \in \mu}$ is a family of $\mathcal{U}$-null subsets of $\kappa$, then $\bigcup_{i \in \mu} A_i$ is $\mathcal{U}$-null. Indeed, $A_i \notin \mathcal{U}$ implies $\kappa \setminus A_i \in \mathcal{U}$ because $\mathcal{U}$ is an ultrafilter, and $\kappa$-completeness gives
\begin{align*}
\bigcap_{i \in \mu}(\kappa \setminus A_i) \in \mathcal{U}.
\end{align*}
Since
\begin{align*}
\bigcap_{i \in \mu}(\kappa \setminus A_i)=\kappa \setminus \bigcup_{i \in \mu} A_i,
\end{align*}
the union $\bigcup_{i \in \mu} A_i$ cannot belong to $\mathcal{U}$, again because an ultrafilter cannot contain both a set and its complement.
[guided]
The point of $\kappa$-completeness is that it converts fewer than $\kappa$ many null-set statements into one null-set statement. Let $\mu$ be a cardinal with $\mu < \kappa$, and let $(A_i)_{i \in \mu}$ be a family of subsets of $\kappa$ such that $A_i \notin \mathcal{U}$ for every $i \in \mu$.
Because $\mathcal{U}$ is an ultrafilter, for each $i \in \mu$ exactly one of $A_i$ and $\kappa \setminus A_i$ belongs to $\mathcal{U}$. Since $A_i \notin \mathcal{U}$, we have $\kappa \setminus A_i \in \mathcal{U}$. Since there are only $\mu < \kappa$ many such complements, $\kappa$-completeness applies and gives
\begin{align*}
\bigcap_{i \in \mu}(\kappa \setminus A_i) \in \mathcal{U}.
\end{align*}
By De Morgan's law, this intersection is exactly the complement of the union:
\begin{align*}
\bigcap_{i \in \mu}(\kappa \setminus A_i)=\kappa \setminus \bigcup_{i \in \mu} A_i.
\end{align*}
Therefore $\kappa \setminus \bigcup_{i \in \mu} A_i \in \mathcal{U}$. If $\bigcup_{i \in \mu} A_i$ also belonged to $\mathcal{U}$, then $\mathcal{U}$ would contain two disjoint sets whose intersection is $\varnothing$, forcing $\varnothing \in \mathcal{U}$, impossible for an ultrafilter. Hence $\bigcup_{i \in \mu} A_i \notin \mathcal{U}$.
[/guided]
[/step]
[step:Show that every bounded subset of $\kappa$ is $\mathcal{U}$-null]
Let $B \subset \kappa$ be bounded. Choose an ordinal $\beta < \kappa$ such that $B \subset \beta$. Since $\kappa$ is a cardinal and $\beta < \kappa$, the set $\beta$ has cardinality less than $\kappa$. For every $\alpha < \beta$, nonprincipality gives $\{\alpha\} \notin \mathcal{U}$. Thus $\beta$ is the union of fewer than $\kappa$ many $\mathcal{U}$-null singletons:
\begin{align*}
\beta=\bigcup_{\alpha < \beta}\{\alpha\}.
\end{align*}
By the null-set consequence of $\kappa$-completeness from the previous step, $\beta \notin \mathcal{U}$. Since $B \subset \beta$, if $B \in \mathcal{U}$ then upward closure of filters would imply $\beta \in \mathcal{U}$, a contradiction. Therefore $B \notin \mathcal{U}$.
[/step]
[step:Assume singularity and cover $\kappa$ by fewer than $\kappa$ bounded sets]
Suppose, toward a contradiction, that $\operatorname{cf}(\kappa)=\lambda<\kappa$. By the definition of cofinality, choose a cofinal map
\begin{align*}
c:\lambda \to \kappa.
\end{align*}
For each $i \in \lambda$, define the bounded initial segment $B_i \subset \kappa$ by
\begin{align*}
B_i=\{\alpha \in \kappa : \alpha < c(i)\}.
\end{align*}
Each $B_i$ is bounded in $\kappa$, hence $B_i \notin \mathcal{U}$ by the previous step.
Because $c[\lambda]$ is cofinal in $\kappa$, every $\alpha \in \kappa$ satisfies $\alpha < c(i)$ for some $i \in \lambda$. Hence
\begin{align*}
\kappa=\bigcup_{i \in \lambda} B_i.
\end{align*}
Since $\lambda<\kappa$, the null-set consequence of $\kappa$-completeness gives $\kappa \notin \mathcal{U}$.
[/step]
[step:Contradict the defining property of an ultrafilter]
Every filter on $\kappa$ contains the underlying set $\kappa$. Thus $\kappa \in \mathcal{U}$. The previous step gives $\kappa \notin \mathcal{U}$, a contradiction. Therefore the assumption $\operatorname{cf}(\kappa)<\kappa$ is false, and hence $\operatorname{cf}(\kappa)=\kappa$. This proves that $\kappa$ is regular.
[/step]