6. Let $f(x)$ be a function defined on $\mathbf{R}$, for any $x \in \mathbf{R}$, we have
$$
f(x+3) \leqslant f(x)+3, f(x+2) \geqslant f(x)+2 .
$$

Let $g(x)=f(x)-x$. If $f(4)=2014$, then
$$
f(2014)=
$$
$\qquad$
6.4024.

Let $g(x)=f(x)-x$, then we have
$$
\begin{array}{l}
g(x+2)=f(x+2)-x-2, \\
g(x+3)=f(x+3)-x-3 .
\end{array}
$$

Also, from $f(x+3) \leqslant f(x)+3$,
$$
f(x+2) \geqslant f(x)+2 \text {, }
$$

we get
$$
\begin{array}{l}
g(x+2) \geqslant f(x)+2-x-2=f(x)-x, \\
g(x+3) \leqslant f(x)+3-x-3=f(x)-x .
\end{array}
$$

From equation (1), we have
$$
\begin{array}{l}
g(x+4) \geqslant f(x+2)-x-2 \\
\geqslant f(x)+2-x-2=f(x)-x .
\end{array}
$$

Thus, $g(x+6) \geqslant f(x+2)-x-2 \geqslant f(x)-x$.
From equation (2), we have
$$
g(x+6) \leqslant f(x+3)-x-3 \leqslant f(x)-x \text {. }
$$

Therefore, $g(x+6)=f(x)-x=g(x)$.
Hence, $g(x)$ is a periodic function with a period of 6.
Notice that,
$$
\begin{array}{l}
g(2014)=g(335 \times 6+4)=g(4) \\
=f(4)-4=2014-4=2010 .
\end{array}
$$

Thus, $f(2014)=g(2014)+2014=4024$.