The broken ancient sword is an archeological item that can be obtained by mining fossils with a 5% drop chance. It can be repaired into the ancient sword, a powerful weapon that can summon lightning. To repair it, place it in the top left slot of the archeology workbench and put 10 relic scraps in the bottom slot. Repairing your first sword gives you the "Swing Your Sword!" achievement.
As mentioned above, it can be obtained by mining fossil blocks. However, it can also rarely be obtained by placing a relic scrap into an analyzer.