History of classifying spaces Where did the idea and formal definition of the "classifying space of a (small) category" first appear? 
Added: As Andy Putman noted below, the "classical" early reference for this is G. Segal's Classifying spaces and spectral sequences. It would be interesting to know to what extent this paper is a distillation of "folklore" or was new to him. Does anyone know what Grothendieck's Bourbaki paper says on this?
 A: I asked someone who has been collaborating with Dan Kan recently to ask him who first discovered the nerve, and I'll just paste the relevant part of the e-mail below:

In other news, I asked Dan Kan who really invented the nerve. He didn't know precisely, but after we talked about it for some time, we agreed that Mac Lane's work on the classifying space of a group suggests that he must have been one of the first — if not the first — to have discovered the nerve functor.

I'm going to leave this unattributed for now, since I haven't asked for permission to post it, but for the same reason, I'm also making it community wiki.
As for why Dan Kan would be a reputable source for this issue, read my comments on Andy's post.
Maybe Dan Kan (or my once-removed source) will appear on MO to flesh this answer out!
($\uparrow$ not foreshadowing!)
Anyway, this answer seems to support Sean's original conclusion.
A: I can not pull up the references (mathscinet) from home, but I thought it was earlier. Maybe the type of classifying space you care about is a bit different though. The references I have in mind are Eilenberg and MacLane where they talk about the cohomology of $K(\pi,1)$ spaces. The idea of classifying space also comes up in the classification of bundles, which (and I could be way off on this) seems like it must have been understood by Thom in order to make use of the Pontyagin-Thom construction which certainly predates the above paper by Segal. I think by the time people digested the notion of Eilenberg-MacLane spaces, the Eilenberg-Steenrod axioms, and Brown's representability theorem, classifying spaces were understood. (The last sentence certainly is not a substitute for a good reference, but maybe an argument for it being a bit of folk-knowledge).
More folk evidence- the appropriate understanding of $K$-theory requires an understanding of the classification of vector bundles.
The relevant years are:
Eilenberg-MacLane-1945
Brown Representability-1962
Rene Thom-before 1958 when he won the fields medal (I can't yet read french, though I will make use of MR tomorrow)
Eilenberg-Steenrod Axioms-1945 for a paper, 1952 for their book. 
But again, this may not be the type of thing you are looking for...
A: In 1971, Bott gave a some talks in Mexico at the IPN, in a conference on differential topology sponsored by UNAM, on his work on obstructions to integrability of foliations.  These talks were published in LNM volume 279.  He also described a general construction of a simplicial complex BC associating a simplex to each commutative diagram of a certain shape in a category C.  While he attributed this general construction perhaps to Grothendieck, as I recall he said it went back to work of Segal.
According to a paper of Madsen and Weiss mentioned in the nice link provided by David Roberts, this construction has some relation to the moduli space of Riemann surfaces, perhaps the first example of associating a topological space to a category.  Namely, if G is the group of isotopy classes of automorphisms of a surface of suitably high genus, then BG has the same rational cohomology as the moduli space of stable Riemann surfaces.
A: Historically the first version is the nerve of a covering, which has been used in the works of P. S. Aleksandrov in late 1920-s. The nerve of a covering in that version was treated as a simplicial complex had the elements (which are some open sets) of the covering as vertices, and an $n$-simplex is corresponding to an $(n+1)$-tuple of elements of the covering which have a common nonempty intersection; in particular one gets a finite combplex for a finite covering. This version was soon later used in Čech theory. I emphasize this as often nowdays the Vietoris complex which is a bigger complex whose vertices are pairs $(U,x)$ where $U$ is an open set and $x\in U$ is nowdays often called Čech complex as well, as the finite, original,  version is now more rarely used. Simplicial sets replaced old-fashioned simplicial complexes a couple of decades later. 
Grothendieck generalized the nerve to the case of categories. The simplicial complexes in their combinatorial and topological reincarnation were from the beginning taken interchangeably. However, for simplicial sets, the nice categorical treatment is from Milnor, who formally introduced a notion of geometric realization in modern context; the concept was essentially known but not its properties at the time. Classifying spaces for group case, were of course studied first in the context of group cohomology, so MacLane is probably among the first ones using it. Segal in late 1960s, not only studied the concept in depth but also introduced more complicated version for simplicial categories. 
A: The earliest source I've seen for it is
MR0232393 (38 #718) 
Segal, Graeme
Classifying spaces and spectral sequences. 
Inst. Hautes Études Sci. Publ. Math. No. 34 1968 105–112. 
However, Segal attributes the idea to Grothendieck, and gives a reference to a Seminar Bourbaki report of Grothendieck that I don't have access to.  It's not clear to me from a reading of Segal's paper if this Seminar Bourbaki report has the precise definition or not.
A: I asked a similar question of my Professor when I was reading Segal's paper for a seminar a few years back. Given the introduction which basically claims that the paper has established no original result at all, it was hard to situate this paper historically; what exactly was new in this exposition? I was told that Segal was being exceedingly modest, and that almost all of the formalism of the paper can be attributed to him. After all, I think people are still working out ideas which were "implicit in the work of Grothendieck." So that's some folklore about the folklore, anyway.
A: I mention the paper 
Blakers, A. "Some relations between homology and homotopy groups", Ann. of Math.  (2) 49 (1948) 428--461.
who assigns a simplicial set to what he calls a "group system" and which we now call a "crossed complex", of which a special case is a group.  This continues earlier work of Eilenberg and Mac Lane (Ann. of Math. (2) 46 (1945) 480--509.). 
