The present invention relates to a topical pharmaceutical composition of ketoprofen and methylsulfonylmethane comprising at least one penetration enhancer and one or more 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.