A MWE is:
% !TeX program = XeLaTeX
\documentclass{article}
\usepackage{hyperref}
\begin{document}
\section{\^e\%}
\section{20\%}
\end{document}
It can work fine under pdfLaTeX and LuaLaTeX. But there is a error under XeLaTeX:
(./mwe.out)
Runaway argument?
{ê\BOOKMARK [1][-]{section.2}{20\045}{}
! File ended while scanning use of \@@BOOKMARK.
<inserted text>
\par
l.5 \begin{document}
?
(./mwe.out)
Runaway argument?
{ê\BOOKMARK [1][-]{section.2}{20\045}{}
! File ended while scanning use of \@@BOOKMARK.
<inserted text>
\par
l.5 \begin{document}
?
\@outlinefile=\write3
\openout3 = `mwe.out'.
I can see the bookmark auxiliary file (mwe.out) is
\BOOKMARK [1][-]{section.1}{ê%}{}% 1
\BOOKMARK [1][-]{section.2}{20\045}{}% 2
I think that it is due to the first % in the first \BOOKMARK. How can I avoid it under XeLaTeX?

bookmarkafterhyperrefit doesn't happen. Loadingbookmarkis indeed recommended. – egreg May 08 '14 at 18:00