There are several candidates for the title of first commemorative. The United States 15-cent black stamp of 1866 depicts Abraham Lincoln, and was the first stamp issued after his assassination in 1865, but it was not officially declared as a memorial to him. The US issued stamped envelopes for the Centennial Exposition in 1876, although technically these are postal stationery and not stamps. The UK's Jubilee Issue of 1887 may be thought of as commemorative of the 50 years' reign, although there are no special inscriptions on the stamps, and they were intended as regular stamps.
The first undoubtedly commemorative stamps were issued by New South Wales in 1888 to mark its 100th anniversary; the six types all include the inscription "ONE HUNDRED YEARS". Commemoratives followed in 1891 for Hong Kong and Romania, then in 1892 and 1893 a half-dozen nations of America issued commemoratives for the 400th anniversary of the discovery by Christopher Columbus.
The appearance of commemoratives caused a backlash among some stamp collectors, who balked at the prospect of laying out ever-larger sums to acquire the stamps of the world, and they formed the Society for the Suppression of Speculative Stamps around 1894 to blacklist what they deemed to be excessive stamps. However, it had very little effect, and today the early commemoratives are prized by collectors.