The original nilpotent product was defined by Golovin, who called it the "metabelian product":

Golovin, O.N. *Metabelian products of groups*, Amer. Math. Soc. Transl. Ser. 2 vol. 2 (1956), 117-131, MR 17:824b.

For $2$-nilpotent groups $G$ and $H$, the $2$-nilpotent product of $G$ and $H$ is defined to be
$$ G\amalg^{\mathfrak{N}_2} H = \frac{G*H}{(G*H)_3}$$
where $G*H$ is the free product, and $(G*H)_3$ is the third term of the lower central series of $G*H$. Golovin defines it for arbitrary groups, in which case you mod out by the intersection of $(G*H)_3$ with the cartesian $[G,H]$.

The group has a nice normal form, in that the elements of $G\amalg^{\mathfrak{N}_2} H$ can be written as $ghc$, where $g\in G$, $h\in H$, and $c\in [H,G]$, where $[H,G]$ is isomorphic to the abelian tensor product $H^{\rm ab}\otimes G^{\rm ab}$; the product is given by $(ghc)(g'h'c') = gg'hh'cc'[h,g']$.

The group has the "obvious" universal property relative to nil-2 groups: there are natural inclusions $i_G\colon G\to G\amalg^{\mathfrak{N}_2} H$ and $i_H\colon H\to G\amalg^{\mathfrak{N}_2}H$, and if $K$ is any nil-2 group and $f\colon G\to K$ and $g\colon H\to K$ are group homomorphisms, then there is a unique homomorphism $\varphi\colon G\amalg^{\mathfrak{N}_2}H\to K$ such that $f=\varphi\circ i_G$ and $g=\varphi\circ i_H$.

(More generally, as indicated by Primoz, you can define a $\mathfrak{V}$-product for any variety $\mathfrak{V}$, for groups $G_i\in\mathfrak{V}$ as
$$ \frac{\mathop{*}\limits_{i\in I} G_i}{\mathfrak{V}(\mathop{*}\limits_{i\in I}G_i)},$$
where $\mathfrak{V}(K)$ is the $\mathfrak{V}$-verbal subgroup of $K$. If you don't assume the $G_i$ all lie in $\mathfrak{V}$, then you mod out by the intersection of that verbal subgroup with the cartesian $[G_i]_{i\in I}$, which is the kernel of the canonical map from the free product of the $G_i$ to the direct product of the $G_i$).