Localization and mapping are the fundamental ability for underwater robots to carry out exploration and searching tasks autonomously. This paper presents a novel approach to localization and mapping of a school of wirelessly connected underwater robotic fish (URF). It is based on both Cooperative Localization Particle Filter (CLPF) scheme and Occupancy Grid Mapping Algorithm (OGMA). Using the probabilistic framework, the proposed CLPF has the major advantage that no prior knowledge about the kinematic model of URF is required to achieve accurate 3D localization. It works well when the number of mobile beacons is less than four, which is the minimum number for some traditional localization algorithms. The localization result of CLPF is fed into OGMA to build the environment map. The performance of the proposed algorithms is evaluated through extensive simulation experiments, and results verify the feasibility and effectiveness of the proposed strategy.