Toxic megacolon is seen in –
Features of UC 

Ulcerative colitis involves the rectum and extends proximally.
In severe cases, entire colon may be involved Pancolitis.
It is a disease of continuity, and skip lesions are not found.
In some patients, distal ileum may also develop mucosal inflammation → backwash ileitis.
Only mucosa and submucosal layers of the colon are involvement, deep layer are not involved usually.
Isolated islands of regenerating mucosa bulge upward to create pseudopolyp.
There are a superficial mucosal ulcer but they are not serpentine as seen in CD.
Neutrophilic infiltration into crypts leads to the formation of crypt abscess.
In sever cases of UC, toxic damage to the muscular propria and neural plexus lead to complete shutdown of neuromuscular function →  colon progressively swells to create toxic megacolon.
There may be epithelial dysplasia with progression to frank carcinoma.
Chronic nonspecific ulcerative colititis
Crohn's disease
Colonic diverticulosis
Hamartomatous polyp