There are several javascript web slippy map libraries out there already which can do this. There are also several different ways to feed images into them. There are servers that can serve map images via special protocols (WMS, WMS-C, WMTS, TMS) and there are also tools that can produce tiles and configuration files that can be hosted statically on an ordinary web server, often these static tile files follow the TMS standard.

I work on GeoServer and GeoWebCache which are servers that can serve up maps like this. I have co-workers who work on OpenLayers, which is a slippy map library. I haven't used one of the tile tile pre-cutting tools myself, but gdal2tiles is free.

Markem's suggestion amounts to building a simplified version of all that from the ground up yourself.