5. Let $f(x)=\frac{1+x}{1-3 x}$. Define
$$
\begin{array}{l}
f_{1}(x)=f(f(x)), \\
f_{n}(x)=f\left(f_{n-1}(x)\right) \quad(n=2,3, \cdots) .
\end{array}
$$

Then $f_{2011}(2011)=$
5. $\frac{1005}{3017}$.

Let $f(x)=f_{0}(x)=\frac{1+x}{1-3 x}$. Then
$f_{1}(x)=f(f(x))=\frac{1+\frac{1+x}{1-3 x}}{1-3 \cdot \frac{1+x}{1-3 x}}=-\frac{1-x}{1+3 x}$,
$f_{2}(x)=f\left(f_{1}(x)\right)=\frac{1-\frac{1-x}{1+3 x}}{1+3 \cdot \frac{1-x}{1+3 x}}=x$,
$f_{3}(x)=f(x)=f_{0}(x)$.
Thus, the expression of $f_{n}(x)$ repeats in a cycle of 3.
$$
\begin{array}{l}
\text { Then } f_{2011}(x)=f_{3 \times 670+1}(x) \\
=f_{1}(x)=\frac{x-1}{1+3 x} .
\end{array}
$$

Therefore, $f_{2011}(2011)=\frac{2011-1}{1+3 \times 2011}=\frac{1005}{3017}$.