The Casimir force between metal-dielectric composite slabs containing nonspherical particles is investigated. The composite slab may have the symmetric (the nonspherical metal particles and spherical dielectric particles are randomly distributed) or asymmetric microstructure (the nonspherical metal particles are randomly embedded in the dielectric host medium), and the corresponding effective permittivity is described by the generalized Bruggeman effective medium approximation or generalized Maxwell-Garnett approximation. As a consequence, the Casimir force can be controlled by the volume fraction and the particles' shape. It is found that the Casimir force achieves a minimal value for spherical particles, and the magnitude of Casimir force can become strong for nonspherical particles. In addition, the Casimir force for the metal-dielectric composites with the symmetric microstructure shows a fast change at the shape-dependent percolation threshold, above (below) which the composite slab is metallic (dielectric). Our study may be of great interest for making precise comparisons between theoretical and experimental results on the Casimir force.