Terminating the workflow will set its status to Canceled and will delete all tasks created by the workflow. Via browser interface. Via code. // Cancel SPWorkflowManager.CancelWorkflow(workflowProperties.Workflow);. Applies To ...
Microsoft SharePoint Full Article Link - Cancelling a SharePoint Workflow