I would take a look at Fukuyama's "Origins of Political Order" and "Political Order and Political Decay". The first hints of meritocracy were in China during the Qin and Han dynasties, where exams where used to provide positions in bureaucracy to those not of noble birth.
Prussia was really the first example of this in the west, where in 1770 all civil servants were required to pass a written exam.