Desertion is the abandonment of duty without permission of one's government or superiors.
Desertion is a court martial offense. In order to find one guilty of desertion, the prosecution must prove that the accused had intended not to return. Simple absence from duty does not constitute desertion, but can face the lesser charge of unauthorized absence, which may be handled through captain's mast.
Johnathan Bucyrus faced possible desertion charges after he was found by the USS Baldwin in 2377. However, Baldwin's legal affairs officer, Sara Jackson, suggested that it might be difficult to prove desertion. She suggested that he plea to unauthorized absence and accept a reprimand. (USS Baldwin: "Wild Roses")