First, the left side of the equation is a scalar function and the right side is a $1$-form, so the equation is obviously incorrect.
Here $x^i$ has two separate but closely related definitions. One is simply the $i$-th coordinate of $\newcommand\R{\mathbb{R}}\R^n$. The other is the function $x^i: U \rightarrow \R$. To keep track of things more easily, let's rename one of them.
Let's use $x^i$ as the $i$-th coordinate of a point in $\R^n$. In other words, denote a point in $\R^n$ by $$x = (x^1, \dots, x^n).$$ On the other hand, let's denote the coordinate map by $$\phi = (\phi^1, \dots, \phi^n),$$ where each $\phi^i: U \rightarrow \R$.
The equation can now be written as
$$ d(\phi^i\circ\phi^{-1}) = e^i. $$
This can be proved trivially as follows: For any $x \in \phi(U)$,
$$ \phi\circ\phi^{-1}(x) = x, $$
and therefore $$ \phi^i(\phi^{-1}(x)) = x^i. $$
Therefore,
$$
d(\phi^i\circ\phi^{-1}(x)) = dx^i = e^i.
$$
I agree that $d(e^i) = 0$.
ADDED COMMENT:
Why I consider $e^i$ to be an abuse of notation:
There is a distinction worth making between the manifold $\mathbb{R}^n$ and the vector space of tangent vectors $\mathbb{R}^n$. On manifold, the differential of a function is a basic concept. On the other hand, the tangent space is a vector space, which belongs to the world (i.e., categories) of linear algebra, where differentiation is never useful (for obvious reasons). Even though technically you can differentiate an element of $T_p^*M$, it's pointless because all you get is the element itself.
There is a tendency (especially by physicists) to get sloppy about the distinction between the manifold $\mathbb{R}^n$ and the tangent space $\mathbb{R}^n$. When the authors write $(\mathbb{R}^n)^*$, it indicates that they are aware of and want to account for this distinction. But then they violate it by conflating the two different meanings of $e^i$.
Too many people treat the notation of modern differential geometry as just that, convenient index-free notation. However, it's much more than that. It elucidates the functorial aspects of differential geometry, especially the parallels with the functorial aspects of linear algebra. For that reason, I like to call differential geometry "parameterized linear algebra".