For every finite $p$-group $G$ of order $p^n$ with derived subgroup of order $p^m$, Rocco in \cite{roc} proved that the order of tensor square of $G$ is at most $p^{n(n-m)}$. This upper bound has been improved recently by author in \cite{ni}. The aim of the present paper is to obtain a similar result for a non-abelian nilpotent Lie algebra of finite dimension. More precisely, for any given $n$-dimensional non-abelian nilpotent Lie algebra $L$ with derived subalgebra of dimension $m$ we have $\mathrm{dim} (L\otimes L)\leq (n-m)(n-1)+2$. Furthermore for $m=1$, the explicit structure of $L$ is given when the equality holds. Comment: Paper in press in Linear Multilinear Algebra