According to (2007) Population Games. In: Game Theory. Springer Undergraduate Mathematics Series. Springer, London, page 142:
A necessary condition for evolutionary stability is $\sigma^* \in \underset{{\sigma}}{\mathrm{argmax}}\> \pi(\sigma,\boldsymbol{x}^*)$,
where $\boldsymbol{x}^*$ is the profile generated by a population of individuas who all adopt strategy $\sigma^*$ (i.e., $\boldsymbol{x}^*=\sigma^*$).
($\pi(\sigma,\boldsymbol{x})$ denotes the payoff for an individual who uses a strategy $\sigma$ in a population with profile $\boldsymbol{x})$
The formal definition of ESS in this book is
A mixed strategy $\sigma^*$ is an ESS if there exists an $\bar{\epsilon}$ such that for every $0<\epsilon < \bar{\epsilon}$ and every $\sigma \neq \sigma^*$, $\pi(\sigma^*,\boldsymbol{x}_{\epsilon})>\pi(\sigma,\boldsymbol{x}_{\epsilon})$.
My question is: why is this a necessary condition but not sufficient? Is there any counter example showing that a best strategy against itself is not a evolutionary stability?
Well, the reason is that there may be another best reply, and that strategy could then be a successful mutant. Here's a boring example: a two player symmetric game,say, Hawk-Dove, with $\pi(H,H)=\pi(H,D)=\pi(D,H)=\pi(D,D)=1.$ Then if the population plays D, D is a best reply, but so is H, so a mutant H will survive and the equilibrium is not ESS. So if the Nash equilibrium is not what is called "strict" then it may not be an ESS.
Here's maybe a less boring example: three actions $a,b,c$ with $\pi(a,a)=\pi(b,b)=\pi(c,c)=k$ $0<k\leq 1$. $\pi(a,b)=(1,-1), \pi(b,a)=(1,-1),\pi(a,c)=(-1,a)$ etc. Then there is a unique mixed strategy Nash equilibrium where each player plays (1/3,1/3,1/3). However, a mutant playing a pure strategy gets $k/3$ in expected value palying the population, but gets $k$ meeting another mutant, and so does better and survives. This is the example shown in figure 50.2 of Osborne and Rubinstein, A Course in Game Theory, my go-to source for game theory questions.
This is an important point, because it shows how not evey Nash equilibrium is an ESS, and thus that ESS is a refinement of Nash.