The symptoms you provided (heavy bleeding after intercourse with pain) might be related to the menstrual cycle hormonal fluctuations. Close to the ovulation period, there are certain hormonal changes that cause the cervix to fill with blood more than usual. This condition, in addition to possible increased friction during intercourse, might cause bleeding from the cervix.
The brown discharge might have been coagulated blood.
You might want to visit a gynecologist to check for a hormonal imbalance and have a physical examination. Conditions like endometriosis (a disorder in which tissue similar to the mucosa of the uterus is found outside of the uterus) might also cause bleeding during intercourse. Your gynecologist might detect or rule out the presence of this condition with a physical examination.