In this paper (paper I) we present optical long-slit spectroscopy and imaging of the protoplanetary nebula CRL618. The optical lobes of CRL618 consist of shock-excited gas, which emits many recombination and forbidden lines, and dust, which scatters light from the innermost regions. From the analysis of the scattered Halpha emission, we derive a nebular inclination of i=24+-6 deg. The spectrum of the innermost part of the east lobe (visible as a bright, compact nebulosity close to the star in the Halpha HST image) is remarkably different from that of the shocked lobes but similar to that of the inner HII region, suggesting that this region represents the outermost parts of the latter. We find a non-linear radial variation of the gas velocity along the lobes. The largest projected LSR velocities (~80 km/s) are measured at the tips of the lobes, where the direct images show the presence of compact bow-shaped structures. The velocity of the shocks in CRL618 is in the range ~75-200 km/s, as derived from diagnostic line ratios and line profiles. We report a brightening (weakening) of [OIII]5007AA ([OI]6300AA) over the last ~10 years that may indicate a recent increase in the speed of the exciting shocks. From the analysis of the spatial variation of the nebular extinction, we find a large density contrast between the material inside the lobes and beyond them: the optical lobes seem to be `cavities excavated in the AGB envelope by interaction with a more tenuous post-AGB wind. The electron density, with a mean value n_e~5E3-1E4 cm-3, shows significant fluctuations but no systematic decrease along the lobes, in agreement with most line emission arising in a thin shell of shocked material (the lobe walls) rather than in the post-AGB wind filling the interior of the lobes. (...)