The bigger picture the Five Lemma fits into The Five Lemma is a statement in category theory about certain conditions under which certain maps in exact sequences are isomorphisms. It has a few relatives like the 4 lemmas and maybe the Nine Lemma. 
All of these have a few oddities: for instance they hold in any abelian category but also in the category of groups. The proofs are similar and involve chasing elements in an "obvious" way and so there is no difficulty in actually proving them. However the statement still seem arcane and unmotivated/random.
Given this, a couple of related questions:


*

*Is there a general setting in which these lemma hold. This general setting should somehow involve both groups and abelian categories as special cases. Perhaps this setting is a Semi-Abelian Category?

*Generalizing in another direction, are there more lemmas like them and is there a way to generate them/describe the set of them. In short, is there any way to make these lemmas seem less random?
 A: Let me give you another point of view on the five lemma. If you have a commutative diagram of $R$-modules
$$
\require{AMScd}
\begin{CD}
0 @>>> A @>>> B @>>> C @>>> D @>>> E @>>> 0 \\
@. @VfVV @VgVV @VhVV @VjVV @VkVV \\
0 @>>> A' @>>> B' @>>> C' @>>> D' @>>> E' @>>> 0 \\
\end{CD}
$$
then by modifying it slightly, you can form a double complex. A double complex is a collection $E_{p,q}$ of R-modules indexed by $\mathbb{Z}^2$
together with differentials $d_v \colon E_{p,q} \to E_{p,q-1}$ and 
$d_h \colon E_{p,q} \to E_{p-1,q}$ such that $d_h^2=0$, $d_v^2=0$ and
$d_h d_v + d_v d_h = 0$. That is, we have an $R$-module set on each point of the lattice of pairs of integers, with vertical and horizontal arrows such that each row and each column is a complex and each square anticommutes.
Anyway, we can transform our previous diagram into a double complex by setting:
$$
\require{AMScd}
\begin{CD}
0 @<<< 0 @<<< 0 @<<< 0 @<<< 0 @<<< 0 @<<< 0 \\
@VVV @VVV @VVV @VVV @VVV @VVV @VVV \\
0 @<<< E @<<< D @<<< C @<<< B @<<< A @<<< 0 \\
@VVV @VkVV @V-jVV @VhVV @V-gVV @VfVV @VVV \\
0 @<<< E' @<<< D' @<<< C' @<<< B' @<<< A' @<<< 0 \\
@VVV @VVV @VVV @VVV @VVV @VVV @VVV \\
0 @<<< 0 @<<< 0 @<<< 0 @<<< 0 @<<< 0 @<<< 0 \\
\end{CD}
$$
I am not drawing the whole diagram, which would be infinite, but the rest of entries would all be zero. I have not changed the horizontal maps, only two vertical maps so that the squares anticommute instead of commuting.
Bear with me a little more. A double complex gives rise to two spectral sequences. Without getting into a lot of detail of what these are, they are given by "pages" $E_{p,q}^n$ of $R$-modules indexed again by $\mathbb{Z}^2$, but there is one for each integer $n$. Moreover, each "page" has differentials $d_n \colon E_{p,q}^n \to E_{p-n,q+n-1}^n$ such that the page $n+1$ is the result of taking homology on the previous page. If, after some page all the differentials are zero, the process has ended and the spectral sequence has collapsed.
This is quite abstract, but let us do it in our example. What we have is the $E^0$ page and the differentials $d_0$ are our vertical arrows. If we assume $f$, $g$, $j$ and $k$ are isomorphisms, the page $E^1$ will be
$$
\require{AMScd}
\begin{CD}
0 @<<< 0 @<<< 0 @<<< 0 @<<< 0 @<<< 0 @<<< 0 \\
@. @. @. @. @. @. @. \\
0 @<<< 0 @<<< 0 @<<< \text{Ker } h @<<< 0 @<<< 0 @<<< 0 \\
@. @. @. @. @. @. @. \\
0 @<<< 0 @<<< 0 @<<< \text{Coker } h @<<< 0 @<<< 0 @<<< 0 \\
@. @. @. @. @. @. @. \\
0 @<<< 0 @<<< 0 @<<< 0 @<<< 0 @<<< 0 @<<< 0 \\
\end{CD}
$$
Now the differentials $d_1$ are precisely the horizontal arrows, which are all forced to be zero. The rest of differentials in other pages have to be zero too, because either the source or the target is zero. So the sequence collapses here.
Now we can use the symmetry of $p$ and $q$ and there is a spectral sequence with the same initial $E^0$ page, but the differentials $d_0$ are the horizontal maps. Since by assumption, the two rows are exact, the homology at each term is zero and so the $E^1$ page is identically zero. So the rest of differentials have to vanish since everything is zero, and so the sequence collapses here.
Both exact sequences compute the same thing (I am not entering into details of what they are computing), so they have to give the same result. In this case, this implies that the kernel and cokernel of $h$ is zero, that is, $h$ is an isomorphism.
With similar setup, one can prove the nine lemma, the snake lemma, etc. and you can produce you own lemmas with appropriate double complexes. This process works in any abelian category.
While this is not a complete answer to your questions, I think it shows that these lemmas are not random, they are a result of considerations with spectral sequences of double complexes.
