Given your clarification above, here is an example that might satisfy you. Consider the category $\bf{Alg}$ of, say, complex unital algebras and the category $\bf{Grp}$ of groups. Define a functor $U: \bf{Alg} \to \bf{Grp}$ by taking each complex algebra $A$ to its group of units (i.e. invertible elements), and each algebra homomorphism $f: A \to B$ to its restriction to $U(A)$ (you can easily verify that this does indeed define a functor). Clearly, $U(A)$ and $A$ have different underlying sets, so this should satisfy your requirements.
This functor has a left adjoint (equivalently, there exists a universal morphism from every group to $U$), which associates to each group $G$ the (complex) group algebra $\mathbb{C}[G]$, defined as follows: the underlying vector space of $\mathbb{C}[G]$ is the space of finitely supported functions $f: G \to \mathbb{C}$, and the multiplication is
$$ (f \ast g)(x) = \sum_{s,t \in G, st = x} f(s)g(t) = \sum_{s \in G} f(s)g(s^{-1}x), $$
for $f,g \in \mathbb{C}[G]$. The universal morphism $\Delta: G \to U(\mathbb{C}[G])$ is defined by $g \mapsto \delta_g$, where $\delta_g(s) = 1$ if $s = g$ and $\delta_g(s) = 0$ otherwise (you can easily show that this is a group homomorphism). A group homomorphism $\pi: G \to U(A)$, induces an algebra homomorphism $\hat{\pi}: \mathbb{C}[G] \to A$ by
$$ \hat{\pi}(f) = \sum_{s \in G} f(s)\pi(s), $$ satisfying $\hat{\pi} \Delta = \pi$ (and it is the unique one with that property).