Is any ring with a homomorphism out of a full matrix ring necessarily itself isomorphic to a full matrix ring? The title says it all. But actually, one should be answering the following stronger question:

Question: For any ring $R$ and any positive integer $n$, is the functor $R/\mathbf{Ring} \to M_n(R) /\mathbf{Ring}$ between coslice categories induced by the matrix ring functor $M_n:\mathbf{Ring} \to \mathbf{Ring}$ an equivalence?

In this question, all rings and all homomorphisms are required to be unital. We know of course that $M_n(R)$ and $R$ are Morita equivalent, but that alone does not help.
Some thoughts
To answer this question, one must first know how one can recover $R$ from $M_n(R)$ given some additional information.
For any $1 \le i,j \le n$, there is a matrix $E_{i,j}$ with a $1$ in entry $i,j$ and $0$s elsewhere. Multiplying a matrix by $E_{i,j}$ on the left causes the $i$th row to become what used to be the $j$th row (or leaves the $i$th row unchanged if $i=j$) and all other rows to become zero. Likewise, multiplying a matrix by $E_{i,j}$ on the right causes the $j$th column to become what used to be the $i$th column (or leaves the $j$th column unchanged if $i=j$) and all other columns to become zero. It follows then that multiplying a matrix by $E_{1,i}$ on the left and $E_{j,1}$ on the right causes the entry in the top-left corner to become what used to be entry $i,j$ and all other entries to become zero.
Hence, the ring $R$ can be recovered from $M_n(R)$ as the subring consisting of those matrices $A$ for which $E_{1,1}AE_{1,1}=E_{1,2}AE_{2,1}=...=E_{1,n}AE_{n,1}$ and $E_{1,i}AE_{j,1}=0$ for $i \neq j$.
Now, given a ring homomorphism $f:M_n(R) \to S$, one can of course consider the subset $S'$ of $S$ consisting of those $s \in S$ for which $f(E_{1,1})sf(E_{1,1})=f(E_{1,2})sf(E_{2,1})=...=f(E_{1,n})sf(E_{n,1})$ and $f(E_{1,i})sf(E_{j,1})=0$ for $i \neq j$, but there are two problems:


*

*First, it is not even clear that $S'$ defines a subring of $S$, and

*Second, even if $S'$ does in fact define a subring of $S$, while $f$ obviously induces a ring homomorphism from $R$ to $S'$, it is not clear that $S$ must be isomorphic to $M_n(S')$.

 A: Suppose a ring $S$ has a collection of elements $e_{ij}$ ($1\leq i,j\leq n$) such that $e_{ij}e_{k\ell}=\delta_{jk}e_{i\ell}$ and $\sum e_{ii}=1$.  Then I claim $S$ is isomorphic to a matrix ring such that $e_{ij}$ is the matrix with $ij$ entry $1$ and all other entries $0$.
To prove this, let $S_{ij}=e_{ii}Se_{jj}$ (this should be the set of matrices whose only nonzero entry is the $ij$ entry).  Note that $S_{ij}S_{k\ell}\subseteq S_{i\ell}$ and is $0$ if $j\neq k$.  In this way, we can consider the direct sum $\bigoplus S_{ij}$ as a ring, where multiplication is given by matrix multiplication, and there is a ring-homomorphism $F:\bigoplus S_{ij}\to S$ given by just adding up the entries.  We can also define $G:S\to \bigoplus S_{ij}$ by letting $G(x)$ be the matrix whose $ij$ entry is $e_{ii}xe_{jj}$.  Note that $F(G(x))=(\sum_i e_{ii})x(\sum_j e_{jj})=1\cdot x\cdot 1=x$, and conversely, $GF$ is also the identity since $e_{ii}xe_{jj}=x$ if $x\in S_{ij}$ and $e_{ii}xe_{jj}=0$ if $x\in S_{k\ell}$ for $(k,\ell)\neq (i,j)$.  Thus $F$ is in fact a ring isomorphism.
To conclude $S$ is actually a matrix ring, we need to identify each $S_{ij}$ with a single ring such that the multiplication $S_{ij}\times S_{jk}\to S_{ik}$ is given by that ring's multiplication for all $i,j,k$.  To do this, note that $S_{11}$ is a ring (with identity $e_{11}$), and we have canonical bijections $S_{11}\to S_{ij}$ given by $x\mapsto e_{i1}xe_{1j}$ (with inverse $x\mapsto e_{1i}xe_{j1}$).  Identifying each $S_{ij}$ with $S_{11}$ via these bijections, the multiplication $S_{ij}\times S_{jk}\to S_{ik}$ becomes the map $S_{11}\times S_{11}\to S_{11}$ given by $$(x,y)\mapsto e_{1i}((e_{i1}xe_{1j})\cdot (e_{j1}ye_{1k}))e_{k1}=e_{11}xe_{11}ye_{11}=xy.$$  That is, it is just the ordinary multiplication on $S_{11}$.  Thus, our ring $\bigoplus S_{ij}$ is isomorphic to the matrix ring $M_n(S_{11})$.
Moreover, suppose we are given two such rings $S,S'$ with elements $e_{ij}$ and $e_{ij}'$ as above and a homomorphism $f:S\to S'$ such that $f(e_{ij})=e_{ij}'$ for each $ij$.  Then $f$ maps $S_{ij}$ to $S'_{ij}$ for each $ij$ and also preserves the canonical bijections between the different $S_{ij}$.  It follows that$f$ coincides with $M_n(f_{11}):M_n(S_{11})\to M_n(S'_{11})$ where  $f_{11}:S_{11}\to S'_{11}$ is the restriction of $f$. 

Now, turning to the setting of your question, given a homomorphism $f:M_n(R)\to S$, we can let $e_{ij}=f(E_{i,j})$ and we find that $S$ is a matrix ring, and that $f$ is obtained by applying the functor $M_n$.  Moreover, a similar conclusion applies to any morphism in the category $M_n(R) /\mathbf{Ring}$, since it will preserve the elements $e_{ij}$.  Thus the answer to your stronger question is yes.
