It seems that commutative diagrams appeared sometime in the late 1940s  for example, EilenbergMcLane (1943) group cohomology paper does not have any, while the 1953 HochschildSerre paper does. Does anyone know who started using them (and how they convinced the printers to do this)?

24$\begingroup$ +1 for the parenthetical question! $\endgroup$ – José FigueroaO'Farrill Mar 24 '11 at 18:25

15$\begingroup$ Well, printers have always enjoyed a challenge: browsing Cajori's book on the history of notations shows lots of things which simply make marvel at the printers! On the other hand, maybe the printers that started accepting diagrams consulted a medium, heard about LaTeX, Xypic and friends, and were comforted by the fact that in short time we would be doing all the workdiagrams and all... :) $\endgroup$ – Mariano SuárezÁlvarez Mar 24 '11 at 19:07

2$\begingroup$ @José FigueroaO'Farrill: somewhat related to this question (and the parenthetical question): even in the old days, the inhouse editors sometimes put in a good word for diagrams. E.g. in England in the late 1800s there was the institution of "publisher's readers" (some sort of inhouse referee), and one of them, according to Sylvia Nickerson, Publishing History 71: 2012, "with respect to diagrams, he recommends that lines be made bold and varied with thick, thin, dotted or plain lines with arrowheads as appropriate,[...]" (my emphasis) $\endgroup$ – Peter Heinig Jul 16 '17 at 20:34
I can muddy the waters...!
According to editor E. Scholz of Hausdorff’s Collected Works (2008, p. 884):
In a note of 3/20/1933 (Nachlass, fasc. 449) and in a further undated note (fasc. 571), Hausdorff symbolized the functoriality property of homology (in our later terminology) with a commutative diagram of homomorphisms between the terms of two sequences of groups $(A_n)_{n\in\mathbf N}$, $(A'_n)_{n\in\mathbf N}$: (Nachlass, fasc. 571, leaf 1).
Could this have, somehow, made its way out of Bonn (where Hausdorff lectured on combinatorial topology that year) and to Hurewicz, Eilenberg, Steenrod, et al.? This seems not impossible, as e.g. Tucker (1932, footnote 4) mentions discussion of Hausdorff letters in the Princeton seminar. Maybe also noteworthy: Hausdorff’s colleague and mentor in Bonn was Eduard Study, author of another early commutative diagram.
Addition: Six years earlier, Fritz London (son of yet another Bonn mathematician) already had, in Winkelvariable und kanonische Transformationen in der Undulationsmechanik, Z. f. Physik 40 (Dec. 1926) 193210:
(For the story of the arrows themselves, see the relevant questions on $\to$ and $\mapsto$.)
An excerpt from MacLane's "Categories for the working mathematician" (2930)
The fundamental idea of representing a function by an arrow first appeared in topology about 1940, probably in papers or lectures by W. Hurewicz on relative homotopy groups; see [1941].
His initiative immediately attracted the attention of R.H. Fox (see Fox [1943]) and N.E. Steenrod, whose [1941] paper used arrows and (implicitly) functors; see also HurewiczSteenrod [1941]. The arrow $f: X\to Y$ rapidly displaced the occasional notation $f(X)\subset Y$ for a function. It expressed well a central interest of topology. Thus a notation (the arrow) led to a concept (category).
Commutative diagrams were probably also first used by Hurewicz.
Categories, functors and natural transformations themselves were discovered by EilenbergMac Lane [1942a] in their study of limits (via natural transformations) for universal coefficient theorems for Čech cohomology. In this paper commutative diagrams appeared in print (probably for the first time). Thus Ext was one of the first functors considered. A direct treatment of categories in their own right appeared in Eilenberg Mac Lane [1945]...
This last mentioned paper is the one referred to in KConrad's answer.
Eduard Study in Von den Bewegungen und Umlegungen, Math. Ann. 39 (1891) 441566, writes on p. 508:
Here $g, g^*, g'$ are rays in space with polar planes $\gamma, \gamma^*, \gamma'$, $\mathfrak P$ is the “polarity” taking rays to planes and conversely, the $\mathfrak t_i$ are commuting collineations acting on both rays and planes, and Study uses $\mathfrak t_i\mathfrak P$ to denote the composition we would write $\mathfrak P\circ\mathfrak t_i$.
(Essentially the same diagram is repeated in Study’s book Einleitung in die Theorie der Invarianten linearer Transformationen auf Grund der Vektorenrechnung (1923, p. 217), with credit to (1891).)

2$\begingroup$ Impressive. This seems to be a genuine answer. $\endgroup$ – Todd Trimble♦ Jul 2 '17 at 2:05
There's Russell's example from 1919, see here where conjugacy between relations is expressed diagrammatically.
Commutative diagrams really show their significance when dealing with categories, so I would guess they first appeared in that context. Look at the paper which first introduced categories: Eilenberg and Mac Lane's "General Theory of Natural Equivalences" (Trans. AMS) 58 (1945), 231294. You can find that paper through JSTOR, but if you don't have access to JSTOR then get it at http://killingbuddha.altervista.org/FILOSOFIA/GToNe.pdf. In this paper, commutative diagrams are used only a few times and the authors don't say the diagrams commute. Instead they use more elaborate descriptions like "the two paths around the diagram are equivalent". Even if this is not the first place a commutative diagram appeared, that they are used sparingly (considering the context) and described in an awkward way suggests it was one of the earliest times this concept jumped off the blackboard into print.
Weibel's paper on the history of homological algebra, which is available at his website, may provide some earlier sources if you track down references he gives.
EDIT: Perhaps the first book which made extensive use of commutative diagrams is Eilenberg and Steenrod's "Foundations of Algebraic Topology" (1952). On page xi, under the heading of a section they call New Methods, they introduce the term commutativity for certain diagrams of groups and homomorphisms.

1$\begingroup$ I'm pretty sure that the notation $f:X\to Y$ was introduced shortly before EilenbergMacLane (as a replacement for $f(X)\subset Y$ or the like) by, maybe, Hurewicz. $\endgroup$ – Jeff Strom Jun 28 '17 at 11:12

1$\begingroup$ Yes the page hsm.stackexchange.com/questions/5772/…, which is about $\mapsto$ rather than $\rightarrow$, suggests $\rightarrow$ for functions went back to Hurewicz. $\endgroup$ – KConrad Jun 28 '17 at 18:03

$\begingroup$ Mac Lane even says as much in Categories for the Working Mathematician, as mentioned by Gjergji. $\endgroup$ – Todd Trimble♦ Jul 2 '17 at 2:03
Further to David Corfield's post: The diagram below appeared in Frege's 1893 Grundgesetze der Arithmetik (Vol. I, §§130, 172) and illustrates the construction of a mapping that Frege uses to prove that for any finite concept, the objects falling under it can be wellordered.
Russell, of course, studied the Grundgesetze closely; perhaps he found inspiration in Frege's figure (if not the almost childish arrows).

1$\begingroup$ I'm not sure I understand this. Are there implicit maps $x\to c \to y$ that make this a commutative diagram? $\endgroup$ – Douglas Zare Dec 22 '16 at 17:00

1$\begingroup$ I can't help wondering whether or not this is conflating the concept of a commutative diagram with the concept of implication in mathematical logic. $\endgroup$ – Jonathan Beardsley Dec 22 '16 at 17:51

2$\begingroup$ @DouglasZare, no implicit maps, this is not a commutative diagram, but its form is strikingly similar, hence "inspiration". $\endgroup$ – J.J. Green Dec 22 '16 at 18:00

2

2$\begingroup$ @JulesLamers The arrows are available in $\TeX$ via the
fge
package $\endgroup$ – J.J. Green Jun 28 '17 at 11:57