The present invention relates to a topical pharmaceutical composition of nimesulide and methylsulfonylmethane comprising at least one penetration enhancer and gelling agent. Furthermore, the invention relates to process for preparing the said topical pharmaceutical composition and its use for the treatment of pain and inflammatory symptoms associated with muscle-skeletal system, osteoarthritis and rheumatoid arthritis.