Brian Scott's proof is perfectly clear, but somewhat removed from the type of diagonalization argument one naturally associates with Cantor's theorem, Russell's paradox, and so on (see this paper by Yanofsky for a comprehensive overview of diagonalization arguments). I'd like to offer an approach that at its core emphasizes diagonalization.
It's easiest to explain the proof using some (easy) category theory, leaving some steps to the reader. I can give more details if desired. For the cognoscenti, the proof can be internalized to any topos, with $2$ below replaced by the subobject classifier $\Omega$. .
Let $2^X$ denote the poset of order-preserving maps (aka poset maps) $X \to 2 = \{0 \leq 1\}$, with the pointwise order, and let $X^{op}$ denote the opposite or dual poset of $X$. I'll prove a stronger result.
Theorem: There exists no surjective poset map $f: X \to 2^X$, and no surjective poset map $f: X \to 2^{X^{op}}$.
$2^X$ is canonically identified with the poset of upward closed subsets $A \subseteq X$ ordered by inclusion; here upward closed means that if $a \in A$ and $a \leq b$, then $b \in A$. (For, each $f: X \to 2$ determines and is determined by the upward closed subset $f^{-1}(1)$.) Similarly, $2^{X^{op}}$ is canonically identified with the poset of downward closed subsets of $X$, ordered by inclusion (each $f: X^{op} \to 2$ determines and is determined by a downward closed subset $f^{-1}(1)$ of $X$).
A poset map $f: X \to Y$ induces a map $2^f: 2^Y \to 2^X$, sending a poset map $g: Y \to 2$ to $g \circ f: X \to 2$. It can also be viewed as taking an upward closed $B \subseteq Y$ to the inverse image $f^{-1}(B)$ which is also upward closed. The map $2^f$ has a left adjoint, denoted as $\exists_f: 2^X \to 2^Y$. This is a poset map such that for any upward closed $A \subseteq X$ and $B \subseteq Y$ we have
$$\exists_f(A) \subseteq B \qquad \text{iff} \qquad A \subseteq f^{-1}(B).$$
The subset $\exists_f(A)$ may be succinctly described as the smallest upward closed subset of $Y$ containing the image $f(A)$.
Generally speaking, an adjunction between posets, say $f: X \to Y$ and $g: Y \to X$ with $f \dashv g$, is equivalently described as a pair of maps such that $1_X \leq g f$ and $f g \leq 1_Y$. A left adjoint $f$ such that the inequality $f g \leq 1_Y$ is an equality will be called a reflector.
It should be considered a strong notion of surjective map.
Lemma 1: If $f: X \to Y$ is surjective, then $\exists_f: 2^X \to 2^Y$ is a reflector.
The proof is easy. Since $f^{op}: X^{op} \to Y^{op}$ is also surjective, we have that $\exists_{f^{op}}$ is also a reflector.
Here is the core diagonalization argument:
Proposition 1: For any poset $L$, there exists no reflector map $\phi: L \to 2^{L^{op}}$.
Notice that this would prove the half of the theorem that says there are no surjective poset maps $f: X \to 2^{X^{op}}$, otherwise put $L = 2^{X^{op}}$ and $\phi = \exists_{f^{op}}$ to derive a contradiction.
Proof: Suppose $\phi \dashv s: 2^{L^{op}} \to L$ and $\phi \circ s = 1$. Put
$$y = s(\bigcup_{x \notin \phi(x)} \phi(x)).$$
We prove $y \notin \phi(y)$. Suppose $y \in \phi(y) = \bigcup_{x \notin \phi(x)} \phi(x)$. Then $y \in \phi(x)$ for some $x$ such that $x \notin \phi(x)$. Also $\phi(x) \subseteq \phi(y)$. So
$$x \leq s \phi(x) \leq s \phi(y) = y$$
where the first inequality is from $\phi \dashv s$. From $x \leq y$ and $y \in \phi(x)$ and downward-closure of $\phi(x)$, we obtain $x \in \phi(x)$, contradiction.
So $y \notin \phi(y)$. Put $t = s(\{x \in L: x \leq y\})$. We show $t \notin \phi(t)$. If $t \in \phi(t) = \{x: x \leq y\}$, then $t \leq y$, whence $\phi(t) \subseteq \phi(y)$, and since $y \in \phi(t)$ we derive $y \in \phi(y)$, contradiction.
So $t \notin \phi(t)$. But this implies $\phi(t) \subseteq \phi(y)$ by how $y$ was defined, and so $y \in \phi(t)$ implies $y \in \phi(y)$, contradiction. $\Box$
(This proof is actually intuitionistically valid. If anyone has doubts, I suggest reading this article by Andrej Bauer on the distinction between "proof of negation" and "proof by contradiction".)
Now we'll wrap things up. A poset map $f: X \to Y$ is called full if for any elements $x, y \in X$, we have $x \leq y$ whenever $f(x) \leq f(y)$. It is easy to see that full maps are injective.
Lemma 2: If $i: X \to Y$ is a full map, then $2^i$ is a reflector.
I'll sketch the proof. $2^i: 2^Y \to 2^X$ has a right adjoint (which category theorists often denote by $\forall_i: 2^X \to 2^Y$) because it preserves colimits (joins). So we have $1_{2^Y} \leq \forall_i 2^i$ and $2^i \forall_i \leq 1_{2^X}$, so all that is left is to show $1_{2^X} \leq 2^i \forall_i$, equivalent to $\exists_i \leq \forall_i$, equivalent to $2^i \exists_i \leq 1_{2^X}$. But for any upward closed $A \subseteq X$, if $a' \in i^{-1} \exists_i A$, then $i(a')$ belongs to the upward closure of $i(A)$, i.e., $i(a) \leq i(a')$ for some $a \in A$. Since $i$ is full, $a \leq a'$, and since $A$ is upward closed, $a' \in A$. Thus we have shown $i^{-1} \exists_i A \subseteq A$, as desired.
Proposition 2: There is no reflector map $\phi: L \to 2^L$.
Proof: Let $i: L^{op} \to 2^L$ be the poset map taking $x \in L$ to the upward closed set $\{y \in L: x \leq y\}$. It is simple to check that $i$ is full (it is an analogue of the Yoneda embedding). Thus $2^i$ is a reflector by Lemma 2, and so if we suppose there exists a reflector $\phi: L \to 2^L$, we get a composite of reflector maps
$$L \stackrel{\phi}{\to} 2^L \stackrel{\exists_\phi}{\to} 2^{2^L} \stackrel{2^i}{\to} 2^{L^{op}}.$$
This composite is also a reflector, and this contradicts Proposition 1. $\Box$
This gives the other half of the theorem, using the same reasoning as in the sentence just after the statement of Proposition 1.