For how long is this going on?
Whatever it is (most likely bacteria) has eroded a large part of the hard rayed dorsal fin and the underlying tissue and is now closing in on the fish's spinal cord.
If this fish can be saved it will be severely disfigured.
I would try a broadband antibiotic (needs to be done in a separate hospital tank), but it may already be too late to save this fish.