Context. Chamaeleon I is the most active region in terms of star formation in the Chamaeleon molecular cloud complex. Although it is one of the nearest low-mass star forming regions, its population of prestellar and protostellar cores is not known and a controversy exists concerning its history of star formation. Aims. Our goal is to search for prestellar and protostellar cores and characterize the earliest stages of star formation in this cloud. Methods. We used the bolometer array LABOCA at the APEX telescope to map the cloud in dust continuum emission at 870 μm with a high sensitivity. This deep, unbiased survey was performed based on an extinction map derived from 2MASS data. The 870 μm map is compared with the extinction map and C 18 O observations, and decomposed with a multiresolution algorithm. The extracted sources are analysed by carefully taking into account the spatial filtering inherent in the data reduction process. A search for associations with young stellar objects is performed using Spitzer data and the SIMBAD database. Results. Most of the detected 870 μm emission is distributed in five filaments. We identify 59 starless cores, one candidate first hydrostatic core, and 21 sources associated with more evolved young stellar objects. The estimated 90% completeness limit of our survey is 0.22 M for the starless cores. The latter are only found above a visual extinction threshold of 5 mag. They are less dense than those detected in other nearby molecular clouds by a factor of a few on average, maybe because of the better sensitivity of our survey. The core mass distribution is consistent with the IMF at the high-mass end but is overpopulated at the low-mass end. In addition, at most 17% of the cores have a mass larger than the critical Bonnor-Ebert mass. Both results suggest that a large fraction of the starless cores may not be prestellar in nature. Based on the census of prestellar cores, Class 0 protostars, and more evolved young stellar objects, we conclude that the star formation rate has decreased with time in this cloud. Conclusions. The low fraction of candidate prestellar cores among the population of starless cores, the small number of Class 0 protostars, the high global star formation efficiency, the decrease of the star formation rate with time, and the low mass per unit length of the detected filaments all suggest that we may be witnessing the end of the star formation process in Chamaeleon I.